gdiplus: Added GdipTranslateMatrix.
This commit is contained in:
parent
d882fc043d
commit
477874797c
|
@ -591,7 +591,7 @@
|
|||
@ stub GdipTranslateClip
|
||||
@ stub GdipTranslateClipI
|
||||
@ stub GdipTranslateLineTransform
|
||||
@ stub GdipTranslateMatrix
|
||||
@ stdcall GdipTranslateMatrix(ptr long long long)
|
||||
@ stub GdipTranslatePathGradientTransform
|
||||
@ stub GdipTranslatePenTransform
|
||||
@ stub GdipTranslateRegion
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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*);
|
||||
|
|
Loading…
Reference in New Issue