Re: [PATCH v10 0/9] MR1297: gdiplus: Add CustomLineCap implementation (including displaying).
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphicspath.c:
+ { + tmp_points = heap_alloc_zero(custom->pathdata.Count * sizeof(GpPoint)); + if (!tmp_points) { + ERR("Out of memory\n"); + return; + } + + for (INT i = 0; i < custom->pathdata.Count; i++) + { + tmp_points[i].X = posx + custom->pathdata.Points[i].X * cosa + (custom->pathdata.Points[i].Y - 1.0) * sina; + tmp_points[i].Y = posy + custom->pathdata.Points[i].X * sina - (custom->pathdata.Points[i].Y - 1.0) * cosa; + } + if ((custom->pathdata.Types[custom->pathdata.Count - 1] & PathPointTypeCloseSubpath) == PathPointTypeCloseSubpath) + widen_closed_figure(tmp_points, 0, custom->pathdata.Count - 1, pen, pen_width, last_point); + else + widen_open_figure(tmp_points, 0, custom->pathdata.Count - 1, pen, pen_width, LineCapFlat, LineCapFlat, last_point); Is the duplication here OK? Seems like we'd need to recurse if the path can contain curves or multiple segments.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1297#note_16412
participants (1)
-
Esme Povirk (@madewokherd)