[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re[2]: [Gnash-dev] Re: point test

From: Udo Giacomozzi
Subject: Re[2]: [Gnash-dev] Re: point test
Date: Tue, 6 Nov 2007 00:13:04 +0100

Hello Sandro,

Monday, November 5, 2007, 11:52:23 PM, you wrote:
SS> with(myInvalidTopology) {
SS>         moveTo(0,0)
SS>         beginFill(0xFF0000);
SS>         lineTo(10,0);
SS>         lineTo(0,10);
SS>         lineTo(10,10);
SS>         lineTo(0,0);
SS> }

Yes, that's what I was talking about in my other post.

Anyway, there is a big difference between shapes defined in the SWF
file (which are normalized) and dynamic shapes. The latter can produce
all kinds of weird effects for the proprietary player too.

For example, I developed a simple 3D viewer (designed to be player with
proprietary player) where the three axis are shown using 4-point
shapes. As the shapes change their coordinates the renderer starts going
crazy, filling up the scanline up to the end of the "invalidated

>> Solution: provide transformation matrix and check the transformed
>> shape.

SS> I vote for a typedef, or an additional function.
SS> The hit test in the core knows the transformation matrix so wouldn't
SS> be hard to compare both implementations.

The hit test in the core does not suffer from the problem because it
uses the mathematical approach which is extremely accurate of course
and does not depend on any size or matrix.

I'll try to explain it differently: The hit test algorithm built into
the renderer *might* have the same effect of actually rendering the
shape and measure the alpha value at the test point coordinate. If the
shape is rendered small, you loose information.

Without a transformation matrix the shape is always rendered the same
way and you won't have (see) the information you would have if you
rendered the shape at a bigger size -- just like you can zoom into a
vector graphic at any grade you like whereas a zoomed bitmap becomes

If the above is true depends on the rendering engine, but at least AGG
does not perform the check at subpixel level because the hit_test()
function takes integer arguments.

Do you understand the difference now? :)

Anyway, this only matters when we really want to go the
hittest-by-renderer way which I still am not happy with...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]