EMF+ custom line caps (and any caller that supplies a notched arrow polygon) left a visible triangular gap between the line shaft and the arrowhead: createAreaGeometryForLineStartEnd shortened the line by the polygon's full Y extent (out to the back wings) even though the centerline exits the polygon interior earlier, at the back-of-cap notch. Detect that case by computing the X=0 crossings of the transformed arrow polygon and reducing the consumed line length to the first crossing above Y=0 when the centerline is interior at Y=0+. Simple convex caps (triangles, squares, etc.) are unaffected because their centerline is interior all the way to the polygon back. Includes basegfx unit tests covering both the notched-arrow case (line must stop at the notch, not the wings) and a simple triangle (line still consumed for full polygon length). Signed-off-by: Andras Timar <andras.timar@collabora.com> Change-Id: I68618c7b2ac7cb5de0a2311d642478218de92652 Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2208 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit fc0881223c9c5a01fb07aeb73bdc849caf981fbc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205088 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Algorithms and Data Types for Graphics
Algorithms and data types for graphics (e.g. polygons, vectors, matrices and the like - see that used in canvas).