From a8322cb1ad1fc263e8634036dc125827ba2d7cc3 Mon Sep 17 00:00:00 2001 From: Evan Stade Date: Thu, 19 Jul 2007 18:22:31 -0700 Subject: [PATCH] gdiplus: Added GdipCreateMatrix. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 18 ++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index e4166e73f79..308c05ef5a2 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -98,7 +98,7 @@ @ stdcall GdipCreateMatrix2(long long long long long long ptr) @ stub GdipCreateMatrix3 @ stub GdipCreateMatrix3I -@ stub GdipCreateMatrix +@ stdcall GdipCreateMatrix(ptr) @ stub GdipCreateMetafileFromEmf @ stub GdipCreateMetafileFromFile @ stub GdipCreateMetafileFromStream diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c index 928b5fe4f81..0752077b754 100644 --- a/dlls/gdiplus/matrix.c +++ b/dlls/gdiplus/matrix.c @@ -70,6 +70,24 @@ GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, return Ok; } +GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix) +{ + if(!matrix) + return InvalidParameter; + + *matrix = GdipAlloc(sizeof(GpMatrix)); + if(!*matrix) return OutOfMemory; + + (*matrix)->matrix[0] = 1.0; + (*matrix)->matrix[1] = 0.0; + (*matrix)->matrix[2] = 0.0; + (*matrix)->matrix[3] = 1.0; + (*matrix)->matrix[4] = 0.0; + (*matrix)->matrix[5] = 0.0; + + return Ok; +} + GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix) { if(!matrix) diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index b0c98407825..11d36f5b421 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -86,6 +86,7 @@ GpStatus WINGDIPAPI GdipSetPathFillMode(GpPath*,GpFillMode); GpStatus WINGDIPAPI GdipTransformPath(GpPath*,GpMatrix*); GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**); +GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix**); GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); GpStatus WINGDIPAPI GdipRotateMatrix(GpMatrix*,REAL,GpMatrixOrder); -- 2.11.4.GIT