Nikolay Sivov : gdiplus: Implemented GdipFillRegion.

Alexandre Julliard julliard at winehq.org
Wed Feb 4 09:15:44 CST 2009


Module: wine
Branch: master
Commit: 9f0edc5e7c4bf7f4d85bb1d4b7bd4590cd9d68df
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9f0edc5e7c4bf7f4d85bb1d4b7bd4590cd9d68df

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Tue Feb  3 22:17:47 2009 +0300

gdiplus: Implemented GdipFillRegion.

---

 dlls/gdiplus/graphics.c |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 04beb0b..2673042 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -2375,18 +2375,39 @@ GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GD
     return ret;
 }
 
+/*****************************************************************************
+ * GdipFillRegion [GDIPLUS.@]
+ */
 GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
         GpRegion* region)
 {
+    INT save_state;
+    GpStatus status;
+    HRGN hrgn;
+
+    TRACE("(%p, %p, %p)\n", graphics, brush, region);
+
     if (!(graphics && brush && region))
         return InvalidParameter;
 
     if(graphics->busy)
         return ObjectBusy;
 
-    FIXME("(%p, %p, %p): stub\n", graphics, brush, region);
+    status = GdipGetRegionHRgn(region, graphics, &hrgn);
+    if(status != Ok)
+        return status;
 
-    return NotImplemented;
+    save_state = SaveDC(graphics->hdc);
+    EndPath(graphics->hdc);
+    SelectObject(graphics->hdc, GetStockObject(NULL_PEN));
+
+    FillRgn(graphics->hdc, hrgn, brush->gdibrush);
+
+    RestoreDC(graphics->hdc, save_state);
+
+    DeleteObject(hrgn);
+
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipFlush(GpGraphics *graphics, GpFlushIntention intention)




More information about the wine-cvs mailing list