Re: [PATCH v8 0/6] MR3288: gdiplus: Clip polygons before drawing them
Esme Povirk (@madewokherd) commented about dlls/gdiplus/graphicspath.c:
+ top = in->pathdata.Points[i + j].Y; + + if (in->pathdata.Points[i + j].Y > bottom) + bottom = in->pathdata.Points[i + j].Y; + } + + set_rect(&bounds, leftmost, top, rightmost - leftmost, bottom - top); + + /* properties of intersect rectangle */ + leftmost = (rect.X < bounds.X) ? bounds.X : rect.X; + top = (rect.Y < bounds.Y) ? bounds.Y : rect.Y; + + rightmost = (rect.X + rect.Width < bounds.X + bounds.Width) + ? rect.X + rect.Width : bounds.X + bounds.Width; + bottom = (rect.Y + rect.Height < bounds.Y + bounds.Height) + ? rect.Y + rect.Height : bounds.Y + bounds.Height; I think using fminf/fmaxf functions would make this easier to read.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/3288#note_56108
participants (1)
-
Esme Povirk (@madewokherd)