[PATCH] d2d: Suppress last empty segment also for D2D1_FIGURE_END_OPEN

Henri Verbeet hverbeet at gmail.com
Mon Jan 3 05:58:50 CST 2022


On Fri, 31 Dec 2021 at 08:23, Stefan Brüns <stefan.bruens at rwth-aachen.de> wrote:
> When the last vertex is coincident with the first vertex, the last
> segment should be suppressed for both END_OPEN and END_CLOSED.
>
> When the last, zero length segment is not omitted
> d2d_geometry_intersect_self will add invalid segments.
>
Unfortunately, I don't think that's correct. For an END_OPEN figure,
the first and last vertex coinciding doesn't imply that the last
segment is a zero-length segment.

Note that if the issue is with some part of
d2d_geometry_intersect_self() not handling coinciding vertices well,
that issue should be fixed there. Begin and end vertices coinciding
isn't the only way that situation can occur; consider for example a
trifolium curve (or rose curves more generally) with a shared vertex
at the centre.



More information about the wine-devel mailing list