[PATCH] Implemented GdipDrawImageRectRectI()

Jon Yang jyang08 at ucla.edu
Thu Feb 28 23:54:47 CST 2008


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

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 55fabe4..1446668 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -184,7 +184,7 @@
 @ stub GdipDrawImageRect
 @ stub GdipDrawImageRectI
 @ stdcall GdipDrawImageRectRect(ptr ptr long long long long long long long long long ptr long ptr)
-@ stub GdipDrawImageRectRectI
+@ stdcall GdipDrawImageRectRectI(ptr ptr long long long long long long long long long ptr long ptr)
 @ stdcall GdipDrawLine(ptr ptr long long long long)
 @ stdcall GdipDrawLineI(ptr ptr long long long long)
 @ stdcall GdipDrawLines(ptr ptr ptr long)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 123da48..4f79b7b 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1158,6 +1158,25 @@ GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image,
                srcwidth, srcheight, srcUnit, imageattr, callback, callbackData);
 }
 
+GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, 
+	INT dstx, INT dsty, INT dstwidth, INT dstheight, INT srcx, INT srcy, 
+	INT srcwidth, INT srcheight, GpUnit srcUnit, 
+	GDIPCONST GpImageAttributes* imageAttributes, DrawImageAbort callback, 
+	VOID * callbackData)
+{
+   GpPointF points[3];
+
+    points[0].X = dstx;
+    points[0].Y = dsty;
+    points[1].X = dstx + dstwidth;
+    points[1].Y = dsty;
+    points[2].X = dstx;
+    points[2].Y = dsty + dstheight;
+
+    return GdipDrawImagePointsRect(graphics, image, points, 3, srcx, srcy,
+               srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData);
+}
+
 GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1,
     REAL y1, REAL x2, REAL y2)
 {
-- 
1.5.4.rc4


--=-Srf/kGZIvbSaiCFOF74t--




More information about the wine-patches mailing list