Nikolay Sivov : gdiplus: Implemented GdipSetClipHrgn.
Alexandre Julliard
julliard at winehq.org
Tue Feb 3 09:13:15 CST 2009
Module: wine
Branch: master
Commit: f8edb068e71f4865ac23db051d62b541bd28a10b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f8edb068e71f4865ac23db051d62b541bd28a10b
Author: Nikolay Sivov <bunglehead at gmail.com>
Date: Mon Feb 2 23:33:41 2009 +0300
gdiplus: Implemented GdipSetClipHrgn.
---
dlls/gdiplus/gdiplus.spec | 2 +-
dlls/gdiplus/graphics.c | 23 +++++++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 450c596..ba2b5ab 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -507,7 +507,7 @@
@ stdcall GdipSetAdjustableArrowCapMiddleInset(ptr long)
@ stdcall GdipSetAdjustableArrowCapWidth(ptr long)
@ stdcall GdipSetClipGraphics(ptr ptr long)
-@ stub GdipSetClipHrgn
+@ stdcall GdipSetClipHrgn(ptr long long)
@ stdcall GdipSetClipPath(ptr ptr long)
@ stdcall GdipSetClipRect(ptr long long long long long)
@ stdcall GdipSetClipRectI(ptr long long long long long)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 547f9f6..1c88453 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -3083,6 +3083,29 @@ GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx,
return GdipTranslateMatrix(graphics->worldtrans, dx, dy, order);
}
+/*****************************************************************************
+ * GdipSetClipHrgn [GDIPLUS.@]
+ */
+GpStatus WINGDIPAPI GdipSetClipHrgn(GpGraphics *graphics, HRGN hrgn, CombineMode mode)
+{
+ GpRegion *region;
+ GpStatus status;
+
+ TRACE("(%p, %p, %d)\n", graphics, hrgn, mode);
+
+ if(!graphics)
+ return InvalidParameter;
+
+ status = GdipCreateRegionHrgn(hrgn, ®ion);
+ if(status != Ok)
+ return status;
+
+ status = GdipSetClipRegion(graphics, region, mode);
+
+ GdipDeleteRegion(region);
+ return status;
+}
+
GpStatus WINGDIPAPI GdipSetClipPath(GpGraphics *graphics, GpPath *path, CombineMode mode)
{
TRACE("(%p, %p, %d)\n", graphics, path, mode);
More information about the wine-cvs
mailing list