Vincent Povirk : gdiplus: Implement GdipDrawImagePointRect.

Alexandre Julliard julliard at winehq.org
Tue Sep 8 08:55:35 CDT 2009


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Fri Sep  4 12:51:48 2009 -0500

gdiplus: Implement GdipDrawImagePointRect.

---

 dlls/gdiplus/graphics.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 4350e79..ce54abe 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -1795,16 +1795,25 @@ GpStatus WINGDIPAPI GdipDrawImagePointRect(GpGraphics *graphics, GpImage *image,
     REAL x, REAL y, REAL srcx, REAL srcy, REAL srcwidth, REAL srcheight,
     GpUnit srcUnit)
 {
-    FIXME("(%p, %p, %f, %f, %f, %f, %f, %f, %d): stub\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
-    return NotImplemented;
+    GpPointF points[3];
+    TRACE("(%p, %p, %f, %f, %f, %f, %f, %f, %d)\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
+
+    points[0].X = points[2].X = x;
+    points[0].Y = points[1].Y = y;
+
+    /* FIXME: convert image coordinates to Graphics coordinates? */
+    points[1].X = x + srcwidth;
+    points[2].Y = y + srcheight;
+
+    return GdipDrawImagePointsRect(graphics, image, points, 3, srcx, srcy,
+        srcwidth, srcheight, srcUnit, NULL, NULL, NULL);
 }
 
 GpStatus WINGDIPAPI GdipDrawImagePointRectI(GpGraphics *graphics, GpImage *image,
     INT x, INT y, INT srcx, INT srcy, INT srcwidth, INT srcheight,
     GpUnit srcUnit)
 {
-    FIXME("(%p, %p, %d, %d, %d, %d, %d, %d, %d): stub\n", graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
-    return NotImplemented;
+    return GdipDrawImagePointRect(graphics, image, x, y, srcx, srcy, srcwidth, srcheight, srcUnit);
 }
 
 GpStatus WINGDIPAPI GdipDrawImagePoints(GpGraphics *graphics, GpImage *image,




More information about the wine-cvs mailing list