gdiplus: Implemented GdipDrawImageRect/GdipDrawImageRectI.
This commit is contained in:
parent
19cc99c333
commit
8cf5608089
|
@ -181,8 +181,8 @@
|
|||
@ stub GdipDrawImagePointsI
|
||||
@ stdcall GdipDrawImagePointsRect(ptr ptr ptr long long long long long long ptr ptr ptr)
|
||||
@ stub GdipDrawImagePointsRectI
|
||||
@ stub GdipDrawImageRect
|
||||
@ stub GdipDrawImageRectI
|
||||
@ 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)
|
||||
@ stdcall GdipDrawImageRectRectI(ptr ptr long long long long long long long long long ptr long ptr)
|
||||
@ stdcall GdipDrawLine(ptr ptr long long long long)
|
||||
|
|
|
@ -1100,7 +1100,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
|
|||
srcx, srcy, srcwidth, srcheight, srcUnit, imageAttributes, callback,
|
||||
callbackData);
|
||||
|
||||
if(!graphics || !image || !points || !imageAttributes || count != 3)
|
||||
if(!graphics || !image || !points || count != 3)
|
||||
return InvalidParameter;
|
||||
|
||||
if(srcUnit == UnitInch)
|
||||
|
@ -1177,6 +1177,31 @@ GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image,
|
|||
srcwidth, srcheight, srcUnit, imageAttributes, callback, callbackData);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics *graphics, GpImage *image,
|
||||
REAL x, REAL y, REAL width, REAL height)
|
||||
{
|
||||
RectF bounds;
|
||||
GpUnit unit;
|
||||
GpStatus ret;
|
||||
|
||||
if(!graphics || !image)
|
||||
return InvalidParameter;
|
||||
|
||||
ret = GdipGetImageBounds(image, &bounds, &unit);
|
||||
if(ret != Ok)
|
||||
return ret;
|
||||
|
||||
return GdipDrawImageRectRect(graphics, image, x, y, width, height,
|
||||
bounds.X, bounds.Y, bounds.Width, bounds.Height,
|
||||
unit, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics *graphics, GpImage *image,
|
||||
INT x, INT y, INT width, INT height)
|
||||
{
|
||||
return GdipDrawImageRect(graphics, image, (REAL)x, (REAL)y, (REAL)width, (REAL)height);
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipDrawLine(GpGraphics *graphics, GpPen *pen, REAL x1,
|
||||
REAL y1, REAL x2, REAL y2)
|
||||
{
|
||||
|
|
|
@ -87,6 +87,8 @@ GpStatus WINGDIPAPI GdipDrawImageRectRect(GpGraphics*,GpImage*,REAL,REAL,REAL,
|
|||
GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics*,GpImage*,INT,INT,INT,
|
||||
INT,INT,INT,INT,INT,GpUnit,GDIPCONST GpImageAttributes*,DrawImageAbort,
|
||||
VOID*);
|
||||
GpStatus WINGDIPAPI GdipDrawImageRect(GpGraphics*,GpImage*,REAL,REAL,REAL,REAL);
|
||||
GpStatus WINGDIPAPI GdipDrawImageRectI(GpGraphics*,GpImage*,INT,INT,INT,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawLine(GpGraphics*,GpPen*,REAL,REAL,REAL,REAL);
|
||||
GpStatus WINGDIPAPI GdipDrawLineI(GpGraphics*,GpPen*,INT,INT,INT,INT);
|
||||
GpStatus WINGDIPAPI GdipDrawLines(GpGraphics*,GpPen*,GDIPCONST GpPointF*,INT);
|
||||
|
|
Loading…
Reference in New Issue