[4/8] gdiplus: GdipDrawImagePointsRectI
Nikolay Sivov
bunglehead at gmail.com
Mon Apr 28 15:10:05 CDT 2008
Changelog:
- 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 80b4f68..ee13a4c 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,
--
1.4.4.4
More information about the wine-patches
mailing list