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

Stefan Brüns stefan.bruens at rwth-aachen.de
Mon Jan 3 08:09:32 CST 2022


On Montag, 3. Januar 2022 12:58:50 CET you wrote:
> 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.

Please supply an example where coinciding does not mean zero length.

Last vertex refers to the second vertex of the last segment, not its start 
vertex.
 
> 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.


Coinciding vertices in general are not a problem, only when the start and end 
vertex of a single line/curve segment are identical (and for any curve, also 
all control points are coincident).

AddVertex even checks for this and suppresses the vertex (though, only for 
lines).


Anyway, just suppressing the vertex causes some issues elsewhere, thus I have 
been reworking the patch.

Regards,

Stefan

-- 
Stefan Brüns  /  Bergstraße 21  /  52062 Aachen
phone: +49 241 53809034     mobile: +49 151 50412019
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20220103/c0f6b5b4/attachment.sig>


More information about the wine-devel mailing list