From 3d685cf46b636dc00fcc147e39fff9401ef2dccd Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 21 Jan 2011 11:33:52 -0600 Subject: [PATCH 1/5] gdiplus: Factor out the gdi32 code of GdipFillRegion. --- dlls/gdiplus/graphics.c | 47 ++++++++++++++++++++++++++++++----------------- 1 files changed, 30 insertions(+), 17 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index e85a8ba..a17cbef 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -3282,30 +3282,16 @@ GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GD return ret; } -/***************************************************************************** - * GdipFillRegion [GDIPLUS.@] - */ -GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, - GpRegion* region) +static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush, + GpRegion* region) { INT save_state; GpStatus status; HRGN hrgn; RECT rc; - TRACE("(%p, %p, %p)\n", graphics, brush, region); - - if (!(graphics && brush && region)) - return InvalidParameter; - - if(graphics->busy) - return ObjectBusy; - if(!graphics->hdc) - { - FIXME("graphics object has no HDC\n"); - return Ok; - } + return NotImplemented; status = GdipGetRegionHRgn(region, graphics, &hrgn); if(status != Ok) @@ -3332,6 +3318,33 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, return Ok; } +/***************************************************************************** + * GdipFillRegion [GDIPLUS.@] + */ +GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush, + GpRegion* region) +{ + GpStatus stat; + + TRACE("(%p, %p, %p)\n", graphics, brush, region); + + if (!(graphics && brush && region)) + return InvalidParameter; + + if(graphics->busy) + return ObjectBusy; + + stat = GDI32_GdipFillRegion(graphics, brush, region); + + if (stat == NotImplemented) + { + FIXME("partially implemented\n"); + stat = Ok; + } + + return stat; +} + GpStatus WINGDIPAPI GdipFlush(GpGraphics *graphics, GpFlushIntention intention) { TRACE("(%p,%u)\n", graphics, intention); -- 1.7.2.3