From ad251e7fe33a3eec2549c69661eb2932f3e1fcfa Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Tue, 31 Jul 2007 19:15:41 -0700 Subject: [PATCH] gdiplus: Added GdipSetMatrixElements. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 16 ++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 95a36187f06..37d7dfffe51 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -543,7 +543,7 @@ @ stub GdipSetLineSigmaBlend @ stub GdipSetLineTransform @ stub GdipSetLineWrapMode -@ stub GdipSetMatrixElements +@ stdcall GdipSetMatrixElements(ptr long long long long long long) @ stub GdipSetMetafileDownLevelRasterizationLimit @ stdcall GdipSetPageScale(ptr long) @ stdcall GdipSetPageUnit(ptr long) diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index afb2efe575e..3f96e4f9f08 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -186,6 +186,22 @@ GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, return Ok; } +GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix *matrix, REAL m11, REAL m12, + REAL m21, REAL m22, REAL dx, REAL dy) +{ + if(!matrix) + return InvalidParameter; + + matrix->matrix[0] = m11; + matrix->matrix[1] = m12; + matrix->matrix[2] = m21; + matrix->matrix[3] = m22; + matrix->matrix[4] = dx; + matrix->matrix[5] = dy; + + return Ok; +} + GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts, INT count) { diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index b618dadf069..214055062f2 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -120,6 +120,7 @@ GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder); +GpStatus WINGDIPAPI GdipSetMatrixElements(GpMatrix*,REAL,REAL,REAL,REAL,REAL,REAL); GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix*,GpPointF*,INT); GpStatus WINGDIPAPI GdipTranslateMatrix(GpMatrix*,REAL,REAL,GpMatrixOrder);