gdiplus: Added GdipSetClipGraphics

Nikolay Sivov bunglehead at gmail.com
Wed Oct 22 11:06:07 CDT 2008


Changelog:
    - Added GdipSetClipGraphics

>From 8b878446976db9b729bd4c56f75ef765b1d24de6 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Wed, 22 Oct 2008 20:03:10 +0400
Subject:  Added GdipSetClipGraphics

---
 dlls/gdiplus/gdiplus.spec |    2 +-
 dlls/gdiplus/graphics.c   |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index ef53b9b..fea80a4 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -506,7 +506,7 @@
 @ stdcall GdipSetAdjustableArrowCapHeight(ptr long)
 @ stdcall GdipSetAdjustableArrowCapMiddleInset(ptr long)
 @ stdcall GdipSetAdjustableArrowCapWidth(ptr long)
-@ stub GdipSetClipGraphics
+@ stdcall GdipSetClipGraphics(ptr ptr long)
 @ stub GdipSetClipHrgn
 @ stdcall GdipSetClipPath(ptr ptr long)
 @ stdcall GdipSetClipRect(ptr long long long long long)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 03b0994..3273494 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -2818,6 +2818,17 @@ GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx,
     return GdipScaleMatrix(graphics->worldtrans, sx, sy, order);
 }
 
+GpStatus WINGDIPAPI GdipSetClipGraphics(GpGraphics *graphics, GpGraphics *srcgraphics,
+    CombineMode mode)
+{
+    TRACE("(%p, %p, %d)\n", graphics, srcgraphics, mode);
+
+    if(!graphics || !srcgraphics)
+        return InvalidParameter;
+
+    return GdipCombineRegionRegion(graphics->clip, srcgraphics->clip, mode);
+}
+
 GpStatus WINGDIPAPI GdipSetCompositingMode(GpGraphics *graphics,
     CompositingMode mode)
 {
-- 
1.4.4.4






More information about the wine-patches mailing list