From 459faca0e2032025d570b17ef564c97eb426d180 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 4 Sep 2009 12:51:48 -0500 Subject: [PATCH] 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 1df3eee..8ba42de 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, -- 1.5.4.3