gdiplus: Reimplement GdipFillRectangles using GdipFillPath.
This commit is contained in:
parent
bb16c926b4
commit
6b474b555e
|
@ -3829,20 +3829,23 @@ GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush,
|
||||||
GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRectF *rects,
|
GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRectF *rects,
|
||||||
INT count)
|
INT count)
|
||||||
{
|
{
|
||||||
GpStatus ret;
|
GpStatus status;
|
||||||
INT i;
|
GpPath *path;
|
||||||
|
|
||||||
TRACE("(%p, %p, %p, %d)\n", graphics, brush, rects, count);
|
TRACE("(%p, %p, %p, %d)\n", graphics, brush, rects, count);
|
||||||
|
|
||||||
if(!rects)
|
if(!rects)
|
||||||
return InvalidParameter;
|
return InvalidParameter;
|
||||||
|
|
||||||
for(i = 0; i < count; i++){
|
status = GdipCreatePath(FillModeAlternate, &path);
|
||||||
ret = GdipFillRectangle(graphics, brush, rects[i].X, rects[i].Y, rects[i].Width, rects[i].Height);
|
if (status != Ok) return status;
|
||||||
if(ret != Ok) return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Ok;
|
status = GdipAddPathRectangles(path, rects, count);
|
||||||
|
if (status == Ok)
|
||||||
|
status = GdipFillPath(graphics, brush, path);
|
||||||
|
|
||||||
|
GdipDeletePath(path);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRect *rects,
|
GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRect *rects,
|
||||||
|
|
Loading…
Reference in New Issue