Hello Sandro,

Sunday, November 4, 2007, 11:43:19 PM, you wrote:
SS> The ray-crossing algorithm found in gnash::path::point_test seems not
SS> to check fill sides at all,

Correct. It just counts the number of crossings and assumes that an
odd number means "inside". This works only for simple, single-fill
shapes.

SS> so I guess it's not the algorithm you
SS> described. Could you take a look at it and see if it tells you anything ?
SS> That's one of the gameswf heritage.

The biggest mistake is that there is a path::point_test() at all since
a path alone for itself is meaningless. A path is just a collection of
edges that share the same line/fill styles. Only all paths together
form a valid shape where you can do a hit_test.

Flash uses two fill styles per path for a good reason: because it
is optimized for rendering (which also applies for point test). The
SWF generator is responsible for generating a shape that can be
rendered quickly. Of course you can construct a shape with paths that
don't play well together (ie. inconsistency) but that would mean a
malformed SWF.

That's probably the reason why the Flash player has problems with
dynamic shapes. I already experienced weird rendering artifacts where
the scanline was filled up to the right side of the window instead of
stopping at the outline.


Udo



_______________________________________________
Gnash-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnash-dev

Reply via email to