[Gdiplus 10/15] Implement GdipCreateRegionPath

Adam Petaccia adam at tpetaccia.com
Wed Jul 9 02:33:58 CDT 2008


---
 dlls/gdiplus/gdiplus_private.h |    4 ++++
 dlls/gdiplus/region.c          |   17 ++++++++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index e7ca874..cec6f65 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -158,6 +158,10 @@ struct GpMetafile{
     GpUnit unit;
 };
 
+struct GpRegion{
+    GpPath outline;
+};
+
 struct GpBitmap{
     GpImage image;
     INT width;
diff --git a/dlls/gdiplus/region.c b/dlls/gdiplus/region.c
index 717119f..59e2fa6 100644
--- a/dlls/gdiplus/region.c
+++ b/dlls/gdiplus/region.c
@@ -112,10 +112,21 @@ GpStatus WINGDIPAPI GdipCreateRegion(GpRegion **region)
 
 GpStatus WINGDIPAPI GdipCreateRegionPath(GpPath *path, GpRegion **region)
 {
-    FIXME("(%p, %p): stub\n", path, region);
+    GpPath *pathCopy;
 
-    *region = NULL;
-    return NotImplemented;
+    if(!(path && region))
+        return InvalidParameter;
+
+    TRACE("%p, %p\n", path, region);
+
+    *region = GdipAlloc(sizeof(GpRegion));
+    if (!*region)
+        return OutOfMemory;
+
+    GdipClonePath(path, &pathCopy);
+    (*region)->outline = *pathCopy;
+
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipCreateRegionRect(GDIPCONST GpRectF *rect, GpRegion **region)
-- 
1.5.4.3




More information about the wine-patches mailing list