gdiplus: Added GdipTransformMatrixPoints.

This commit is contained in:
Evan Stade 2007-07-11 18:07:52 -07:00 committed by Alexandre Julliard
parent f28262b47d
commit 47a605ef9b
3 changed files with 23 additions and 1 deletions

View File

@ -582,7 +582,7 @@
@ stub GdipStringFormatGetGenericDefault
@ stub GdipStringFormatGetGenericTypographic
@ stub GdipTestControl
@ stub GdipTransformMatrixPoints
@ stdcall GdipTransformMatrixPoints(ptr ptr long)
@ stub GdipTransformMatrixPointsI
@ stub GdipTransformPath
@ stub GdipTransformPoints

View File

@ -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;
}

View File

@ -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
}