Bartosz Kosiorek : gdiplus: Fix position of Custom Cap when Scale is different that 1.
Module: wine Branch: master Commit: 0fd51346e10839b336dc7c80124b4f232e674645 URL: https://gitlab.winehq.org/wine/wine/-/commit/0fd51346e10839b336dc7c80124b4f2... Author: Bartosz Kosiorek <gang65(a)poczta.onet.pl> Date: Thu Nov 24 19:49:36 2022 +0100 gdiplus: Fix position of Custom Cap when Scale is different that 1. --- dlls/gdiplus/graphicspath.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 9194f6d42aa..10ffa85d6e3 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -2128,13 +2128,13 @@ static void add_anchor(const GpPointF *endpoint, const GpPointF *nextpoint, TRACE("GpCustomLineCap fill: %d basecap: %d inset: %f join: %d scale: %f pen_width:%f\n", custom->fill, custom->basecap, custom->inset, custom->join, custom->scale, pen_width); - /* Coordination where cap needs to be drawn */ - posx = endpoint->X - pen_width * segment_dx / segment_length; - posy = endpoint->Y - pen_width * segment_dy / segment_length; - sina = -pen_width * custom->scale * segment_dx / segment_length; cosa = pen_width * custom->scale * segment_dy / segment_length; + /* Coordination where cap needs to be drawn */ + posx = endpoint->X + sina; + posy = endpoint->Y - cosa; + if (!custom->fill) { tmp_points = heap_alloc_zero(custom->pathdata.Count * sizeof(GpPoint));
participants (1)
-
Alexandre Julliard