Nikolay Sivov : gdiplus: Implemented GdipDrawImagePointsRectI.

Alexandre Julliard julliard at winehq.org
Tue Apr 29 08:54:39 CDT 2008


Module: wine
Branch: master
Commit: 79b49a8f19f1966a7a71cda671616d60bcdb3643
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=79b49a8f19f1966a7a71cda671616d60bcdb3643

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Tue Apr 29 00:10:05 2008 +0400

gdiplus: Implemented GdipDrawImagePointsRectI.

---

 dlls/gdiplus/gdiplus.spec |    2 +-
 dlls/gdiplus/graphics.c   |   21 +++++++++++++++++++++
 include/gdiplusflat.h     |    2 +-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index a49da93..2a3aa8a 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -180,7 +180,7 @@
 @ stub GdipDrawImagePoints
 @ stub GdipDrawImagePointsI
 @ stdcall GdipDrawImagePointsRect(ptr ptr ptr long long long long long long ptr ptr ptr)
-@ stub GdipDrawImagePointsRectI
+@ stdcall GdipDrawImagePointsRectI(ptr ptr ptr long long long long long long ptr ptr ptr)
 @ stdcall GdipDrawImageRect(ptr ptr long long long long)
 @ stdcall GdipDrawImageRectI(ptr ptr long long long long)
 @ stdcall GdipDrawImageRectRect(ptr ptr long long long long long long long long long ptr long ptr)
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 4559390..4982c84 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1201,6 +1201,27 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics *graphics, GpImage *image,
+     GDIPCONST GpPoint *points, INT count, INT srcx, INT srcy, INT srcwidth,
+     INT srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
+     DrawImageAbort callback, VOID * callbackData)
+{
+    GpPointF pointsF[3];
+    INT i;
+
+    if(!points || count!=3)
+        return InvalidParameter;
+
+    for(i = 0; i < count; i++){
+        pointsF[i].X = (REAL)points[i].X;
+        pointsF[i].Y = (REAL)points[i].Y;
+    }
+
+    return GdipDrawImagePointsRect(graphics, image, pointsF, count, (REAL)srcx, (REAL)srcy,
+                                   (REAL)srcwidth, (REAL)srcheight, srcUnit, imageAttributes,
+                                   callback, callbackData);
+}
+
 GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics *graphics, GpImage *image,
     REAL dstx, REAL dsty, REAL dstwidth, REAL dstheight, REAL srcx, REAL srcy,
     REAL srcwidth, REAL srcheight, GpUnit srcUnit,
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 15ab134..73bf7c0 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -80,7 +80,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics*,GpImage*,
     GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,GpUnit,
     GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*);
 GpStatus WINGDIPAPI GdipDrawImagePointsRectI(GpGraphics*,GpImage*,
-    GDIPCONST GpPointF*,INT,INT,INT,INT,INT,GpUnit,
+    GDIPCONST GpPoint*,INT,INT,INT,INT,INT,GpUnit,
     GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*);
 GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL,
     REAL,REAL,REAL,REAL,REAL,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,




More information about the wine-cvs mailing list