[10/21] gdiplus: added GdipSetMatrixElements

Evan Stade estade at gmail.com
Tue Jul 31 21:15:41 CDT 2007


Hi,

 dlls/gdiplus/gdiplus.spec |    2 +-
 dlls/gdiplus/matrix.c     |   16 ++++++++++++++++
 include/gdiplusflat.h     |    1 +
 3 files changed, 18 insertions(+), 1 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 95a3618..37d7dff 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 afb2efe..3f96e4f 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -186,6 +186,22 @@ GpStatus WINGDIPAPI GdipScaleMatrix(GpMa
     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 b618dad..2140550 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -120,6 +120,7 @@ GpStatus WINGDIPAPI GdipGetMatrixElement
 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);
 
-- 
1.4.1


More information about the wine-patches mailing list