Commit b92b6c29 authored by Committed by Alexandre JulliardBrowse files
d2d1: Use the TYPE_END vertex type when last/first vertices coincide.
When the last vertex is coincident with the first vertex, the last segment should be suppressed for both END_OPEN and END_CLOSED. Only when last and first vertex are not coincident the additional line segment may be added - always for intersection tests and similar, and for stroking operations when the figure is CLOSED. Trying to use an zero-length segment in d2d_geometry_intersect_self() will create invalid segments, causing infinite loops later. Instead of reducing the vertex_count for coincident first/last vertices add a dedicated type. This is required as some operations need the last segment, others do not. This also allows to remove some replicated code in StrokeContains()/GetBounds()/Simplify(), as a last Bézier segment is always processed in the regular loop. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51139 Signed-off-by: Stefan Brüns <firstname.lastname@example.org> Signed-off-by: Henri Verbeet <email@example.com> Signed-off-by: Alexandre Julliard <firstname.lastname@example.org>