gdiplus: Added GdipTranslateMatrix.

This commit is contained in:
Evan Stade 2007-07-19 18:22:21 -07:00 committed by Alexandre Julliard
parent d882fc043d
commit 477874797c
3 changed files with 25 additions and 1 deletions

View File

@ -591,7 +591,7 @@
@ stub GdipTranslateClip
@ stub GdipTranslateClipI
@ stub GdipTranslateLineTransform
@ stub GdipTranslateMatrix
@ stdcall GdipTranslateMatrix(ptr long long long)
@ stub GdipTranslatePathGradientTransform
@ stub GdipTranslatePenTransform
@ stub GdipTranslateRegion

View File

@ -136,3 +136,26 @@ GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts,
return Ok;
}
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix *matrix, REAL offsetX,
REAL offsetY, GpMatrixOrder order)
{
REAL translate[6];
if(!matrix)
return InvalidParameter;
translate[0] = 1.0;
translate[1] = 0.0;
translate[2] = 0.0;
translate[3] = 1.0;
translate[4] = offsetX;
translate[5] = offsetY;
if(order == MatrixOrderAppend)
matrix_multiply(matrix->matrix, translate, matrix->matrix);
else
matrix_multiply(translate, matrix->matrix, matrix->matrix);
return Ok;
}

View File

@ -90,6 +90,7 @@ GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*);
GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder);
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);
GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT);
GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);
GpStatus WINGDIPAPI GdipCreatePathIter(GpPathIterator**,GpPath*);
GpStatus WINGDIPAPI GdipDeletePathIter(GpPathIterator*);