Vincent Povirk : gdiplus: Forward GdipFillRectangle to GdipFillRectangles.
Alexandre Julliard
julliard at winehq.org
Mon Nov 25 13:33:14 CST 2013
Module: wine
Branch: master
Commit: 8babdc860a8ce357165bb218e898175d9cf40cd6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8babdc860a8ce357165bb218e898175d9cf40cd6
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Wed Nov 20 16:14:10 2013 -0600
gdiplus: Forward GdipFillRectangle to GdipFillRectangles.
---
dlls/gdiplus/graphics.c | 35 ++++++++++++++---------------------
1 files changed, 14 insertions(+), 21 deletions(-)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index c2a5d42..de0fb30 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3820,38 +3820,31 @@ GpStatus WINGDIPAPI GdipFillPolygon2I(GpGraphics *graphics, GpBrush *brush,
GpStatus WINGDIPAPI GdipFillRectangle(GpGraphics *graphics, GpBrush *brush,
REAL x, REAL y, REAL width, REAL height)
{
- GpStatus stat;
- GpPath *path;
+ GpRectF rect;
TRACE("(%p, %p, %.2f, %.2f, %.2f, %.2f)\n", graphics, brush, x, y, width, height);
- if(!graphics || !brush)
- return InvalidParameter;
-
- if(graphics->busy)
- return ObjectBusy;
-
- stat = GdipCreatePath(FillModeAlternate, &path);
-
- if (stat == Ok)
- {
- stat = GdipAddPathRectangle(path, x, y, width, height);
-
- if (stat == Ok)
- stat = GdipFillPath(graphics, brush, path);
-
- GdipDeletePath(path);
- }
+ rect.X = x;
+ rect.Y = y;
+ rect.Width = width;
+ rect.Height = height;
- return stat;
+ return GdipFillRectangles(graphics, brush, &rect, 1);
}
GpStatus WINGDIPAPI GdipFillRectangleI(GpGraphics *graphics, GpBrush *brush,
INT x, INT y, INT width, INT height)
{
+ GpRectF rect;
+
TRACE("(%p, %p, %d, %d, %d, %d)\n", graphics, brush, x, y, width, height);
- return GdipFillRectangle(graphics, brush, x, y, width, height);
+ rect.X = (REAL)x;
+ rect.Y = (REAL)y;
+ rect.Width = (REAL)width;
+ rect.Height = (REAL)height;
+
+ return GdipFillRectangles(graphics, brush, &rect, 1);
}
GpStatus WINGDIPAPI GdipFillRectangles(GpGraphics *graphics, GpBrush *brush, GDIPCONST GpRectF *rects,
More information about the wine-cvs
mailing list