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 <stefan.bruens@rwth-aachen.de> Signed-off-by:
Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by:
Alexandre Julliard <julliard@winehq.org>
Please register or sign in to comment