mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 04:34:48 +00:00
gdiplus: Partial implementation of GdipDrawImagePointsRect.
This commit is contained in:
parent
586e63ef38
commit
a9c4f30c56
|
@ -1024,20 +1024,43 @@ GpStatus WINGDIPAPI GdipDrawCurve2(GpGraphics *graphics, GpPen *pen,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FIXME: partially implemented */
|
||||||
GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image,
|
GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image,
|
||||||
GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth,
|
GDIPCONST GpPointF *points, INT count, REAL srcx, REAL srcy, REAL srcwidth,
|
||||||
REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
|
REAL srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes* imageAttributes,
|
||||||
DrawImageAbort callback, VOID * callbackData)
|
DrawImageAbort callback, VOID * callbackData)
|
||||||
{
|
{
|
||||||
static int calls;
|
GpPointF ptf[3];
|
||||||
|
POINT pti[3];
|
||||||
|
|
||||||
if(!graphics || !image || !points || !imageAttributes)
|
TRACE("%p %p %p %d %f %f %f %f %d %p %p %p\n", graphics, image, points, count,
|
||||||
return InvalidParameter;
|
srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback,
|
||||||
|
callbackData);
|
||||||
|
|
||||||
if(!(calls++))
|
if(!graphics || !image || !points || !imageAttributes || count != 3)
|
||||||
FIXME("not implemented\n");
|
return InvalidParameter;
|
||||||
|
|
||||||
return NotImplemented;
|
if(image->type != ImageTypeMetafile)
|
||||||
|
return NotImplemented;
|
||||||
|
if((points[0].X != points[2].X) || (points[0].Y != points[1].Y))
|
||||||
|
return NotImplemented;
|
||||||
|
if(srcUnit != UnitInch)
|
||||||
|
return NotImplemented;
|
||||||
|
|
||||||
|
memcpy(ptf, points, 3 * sizeof(GpPointF));
|
||||||
|
transform_and_round_points(graphics, pti, ptf, 3);
|
||||||
|
|
||||||
|
if(IPicture_Render(image->picture, graphics->hdc,
|
||||||
|
pti[0].x, pti[0].y, pti[1].x - pti[0].x, pti[2].y - pti[0].y,
|
||||||
|
srcx * INCH_HIMETRIC, srcy * INCH_HIMETRIC,
|
||||||
|
srcwidth * INCH_HIMETRIC, srcheight * INCH_HIMETRIC,
|
||||||
|
NULL) != S_OK){
|
||||||
|
if(callback)
|
||||||
|
callback(callbackData);
|
||||||
|
return GenericError;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1,
|
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics *graphics, GpPen *pen, INT x1,
|
||||||
|
|
Loading…
Reference in a new issue