gdiplus: Factor out the gdi32 code of GdipFillRegion.

This commit is contained in:
Vincent Povirk 2011-01-21 11:33:52 -06:00 committed by Alexandre Julliard
parent f0296a815e
commit b689e63a86
1 changed files with 30 additions and 17 deletions

View File

@ -3282,30 +3282,16 @@ GpStatus WINGDIPAPI GdipFillRectanglesI(GpGraphics *graphics, GpBrush *brush, GD
return ret; return ret;
} }
/***************************************************************************** static GpStatus GDI32_GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
* GdipFillRegion [GDIPLUS.@] GpRegion* region)
*/
GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
GpRegion* region)
{ {
INT save_state; INT save_state;
GpStatus status; GpStatus status;
HRGN hrgn; HRGN hrgn;
RECT rc; RECT rc;
TRACE("(%p, %p, %p)\n", graphics, brush, region);
if (!(graphics && brush && region))
return InvalidParameter;
if(graphics->busy)
return ObjectBusy;
if(!graphics->hdc) if(!graphics->hdc)
{ return NotImplemented;
FIXME("graphics object has no HDC\n");
return Ok;
}
status = GdipGetRegionHRgn(region, graphics, &hrgn); status = GdipGetRegionHRgn(region, graphics, &hrgn);
if(status != Ok) if(status != Ok)
@ -3332,6 +3318,33 @@ GpStatus WINGDIPAPI GdipFillRegion(GpGraphics* graphics, GpBrush* brush,
return Ok; 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) GpStatus WINGDIPAPI GdipFlush(GpGraphics *graphics, GpFlushIntention intention)
{ {
TRACE("(%p,%u)\n", graphics, intention); TRACE("(%p,%u)\n", graphics, intention);