Commit 0fd51346 authored by Bartosz Kosiorek's avatar Bartosz Kosiorek Committed by Alexandre Julliard

gdiplus: Fix position of Custom Cap when Scale is different that 1.

parent be7db845
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment