gdiplus: Implemented GdipGetClip.
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index bf3a638..d5b562c 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -743,6 +743,12 @@
return retval;
}
+ if((retval = GdipCreateRegion(&(*graphics)->clip)) != Ok){
+ GdipFree((*graphics)->worldtrans);
+ GdipFree(*graphics);
+ return retval;
+ }
+
(*graphics)->hdc = hdc;
(*graphics)->hwnd = NULL;
(*graphics)->smoothing = SmoothingModeDefault;
@@ -894,6 +900,7 @@
if(graphics->hwnd)
ReleaseDC(graphics->hwnd, graphics->hdc);
+ GdipDeleteRegion(graphics->clip);
GdipDeleteMatrix(graphics->worldtrans);
GdipFree(graphics);
@@ -2874,14 +2881,25 @@
GpStatus WINGDIPAPI GdipGetClip(GpGraphics *graphics, GpRegion *region)
{
+ GpRegion *clip;
+ GpStatus status;
+
+ TRACE("(%p, %p)\n", graphics, region);
+
if(!graphics || !region)
return InvalidParameter;
if(graphics->busy)
return ObjectBusy;
- FIXME("(%p, %p): stub\n", graphics, region);
- return NotImplemented;
+ if((status = GdipCloneRegion(graphics->clip, &clip)) != Ok)
+ return status;
+
+ /* free everything except root node and header */
+ delete_element(®ion->node);
+ memcpy(region, clip, sizeof(GpRegion));
+
+ return Ok;
}
GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics *graphics, GpCoordinateSpace dst_space,