gdiplus: Added GdipDrawImageI.

This commit is contained in:
Evan Stade 2007-08-07 18:42:12 -07:00 committed by Alexandre Julliard
parent 0794e5daf3
commit de351ab991
3 changed files with 29 additions and 1 deletions

View File

@ -174,7 +174,7 @@
@ stub GdipDrawEllipseI
@ stub GdipDrawImage
@ stub GdipDrawImageFX
@ stub GdipDrawImageI
@ stdcall GdipDrawImageI(ptr ptr long long)
@ stub GdipDrawImagePointRect
@ stub GdipDrawImagePointRectI
@ stub GdipDrawImagePoints

View File

@ -989,6 +989,33 @@ GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen,
return retval;
}
GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x,
INT y)
{
UINT width, height, srcw, srch;
if(!graphics || !image)
return InvalidParameter;
GdipGetImageWidth(image, &width);
GdipGetImageHeight(image, &height);
srcw = width * (((REAL) INCH_HIMETRIC) /
((REAL) GetDeviceCaps(graphics->hdc, LOGPIXELSX)));
srch = height * (((REAL) INCH_HIMETRIC) /
((REAL) GetDeviceCaps(graphics->hdc, LOGPIXELSY)));
if(image->type != ImageTypeMetafile){
y += height;
height *= -1;
}
IPicture_Render(image->picture, graphics->hdc, x, y, width, height,
0, 0, srcw, srch, NULL);
return Ok;
}
/* FIXME: partially implemented */
GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image,
GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth,

View File

@ -58,6 +58,7 @@ GpStatus WINGDIPAPI GdipDrawArc(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,REAL
GpStatus WINGDIPAPI GdipDrawBezier(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL,REAL,
REAL,REAL,REAL);
GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT,REAL);
GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics*,GpImage*,INT,INT);
GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics*,GpImage*,
GDIPCONST GpPointF*,INT,REAL,REAL,REAL,REAL,GpUnit,
GDIPCONST GpImageAttributes*,DrawImageAbort,VOID*);