gdiplus: Added GdipTransformMatrixPoints.
This commit is contained in:
parent
f28262b47d
commit
47a605ef9b
|
@ -582,7 +582,7 @@
|
|||
@ stub GdipStringFormatGetGenericDefault
|
||||
@ stub GdipStringFormatGetGenericTypographic
|
||||
@ stub GdipTestControl
|
||||
@ stub GdipTransformMatrixPoints
|
||||
@ stdcall GdipTransformMatrixPoints(ptr ptr long)
|
||||
@ stub GdipTransformMatrixPointsI
|
||||
@ stub GdipTransformPath
|
||||
@ stub GdipTransformPoints
|
||||
|
|
|
@ -56,3 +56,24 @@ GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
|
|||
|
||||
return Ok;
|
||||
}
|
||||
|
||||
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts,
|
||||
INT count)
|
||||
{
|
||||
REAL x, y;
|
||||
INT i;
|
||||
|
||||
if(!matrix || !pts)
|
||||
return InvalidParameter;
|
||||
|
||||
for(i = 0; i < count; i++)
|
||||
{
|
||||
x = pts[i].X;
|
||||
y = pts[i].Y;
|
||||
|
||||
pts[i].X = x * matrix->matrix[0] + y * matrix->matrix[2] + matrix->matrix[4];
|
||||
pts[i].Y = x * matrix->matrix[1] + y * matrix->matrix[3] + matrix->matrix[5];
|
||||
}
|
||||
|
||||
return Ok;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ GpStatus WINGDIPAPI GdipStartPathFigure(GpPath*);
|
|||
|
||||
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**);
|
||||
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*);
|
||||
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue