wine/dlls/d2d1
Stefan Brüns b92b6c2929 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>
2022-01-11 21:59:51 +01:00
..
tests d2d1: Use the TYPE_END vertex type when last/first vertices coincide. 2022-01-11 21:59:51 +01:00
bitmap.c
bitmap_render_target.c
brush.c
d2d1.spec
d2d1_private.h d2d1: Implement ID2D1Factory2::CreateStrokeStyle1(). 2021-12-09 17:14:59 +01:00
dc_render_target.c
device.c d2d1: Create feature level 10.0 device context state objects. 2021-12-10 22:00:17 +01:00
effect.c
factory.c d2d1: Implement ID2D1Factory2::CreateStrokeStyle1(). 2021-12-09 17:14:59 +01:00
geometry.c d2d1: Use the TYPE_END vertex type when last/first vertices coincide. 2022-01-11 21:59:51 +01:00
hwnd_render_target.c
layer.c
Makefile.in
mesh.c
state_block.c
stroke.c d2d1: Implement ID2D1Factory2::CreateStrokeStyle1(). 2021-12-09 17:14:59 +01:00
version.rc
wic_render_target.c