gnash-dev
[Top][All Lists]

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

 From: Sandro Santilli Subject: Re: [Gnash-dev] Re: point test Date: Mon, 5 Nov 2007 08:40:14 +0100

```On Mon, Nov 05, 2007 at 12:44:05AM +0100, Udo Giacomozzi wrote:
> Hello Sandro,
>
> Sunday, November 4, 2007, 11:54:26 PM, you wrote:
> SS> Two examples in which your algorithm would fail:
>
> SS>          E2 -->
> SS>     +---------------+              Q : query point
> SS>  ^  |               |             E5 : nearest edge, no fill
> SS>  |  |       +       | E3      E1..E4 : edges with right fill
> SS>  E1 |    E5 | Q     | |
> SS>     |       +       | V
> SS>     +---------------+
> SS>         <--  E4
>
>
> This is not a valid example because E5 would need to have both fill
> sides set.

Why ? It could be a red line into a green-filled square.

> SS>          E2 -->
> SS>     +---------------+              Q : query point
> SS>     |               |
> SS>     |               |
> SS>  ^  |   <-E5        |             E5 : nearest edge, left fill (hole)
> SS>  |  |  +----+       | E3      E1..E4 : edges with right fill
> SS>  E1 |  |    | Q     | |
> SS>     |  +----+       | V
> SS>     +---------------+
> SS>         <--  E4
>
> E5 would have it's right side fill style set and thus we get the
> correct result (that Q is in the filled area).

No it's a left fill. I was wrong calling it an "hole".
It's not an hole, just a red square inside a green square.

> SS> Note that both examples are valid topologies.
>
> Don't agree, the first one is not correct AFAIK. A single path does
> not have to be closed, but a complete shape must be closed by
> definition, if I'm not wrong. If you place a edge inside a filled
> area, it has to contain fill style information.

Ok, you're right, both examples are not valid topologies, in both
cases E5 should have both fill styles.
Now, if they do not, we'd need the normalization phase we were talking
about, or just let it fail.

I guess we can think about it when we have a real-world example exposing
the need for normalization. So far applying the ray-crossing algorithm to
any path with fill info fixed bug #21498.

--strk;

```