[4/6] gdiplus: GdipIsMatrixIdentity

Nikolay Sivov bunglehead at gmail.com
Tue Apr 29 16:28:35 CDT 2008


Changelog:
    - implemented GdipIsMatrixIdentity

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

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 0365ca3..056fde9 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -419,7 +419,7 @@
 @ stub GdipIsEqualRegion
 @ stub GdipIsInfiniteRegion
 @ stdcall GdipIsMatrixEqual(ptr ptr ptr)
-@ stub GdipIsMatrixIdentity
+@ stdcall GdipIsMatrixIdentity(ptr ptr)
 @ stub GdipIsMatrixInvertible
 @ stub GdipIsOutlineVisiblePathPoint
 @ stdcall GdipIsOutlineVisiblePathPointI(ptr long long ptr ptr ptr)
diff --git a/dlls/gdiplus/matrix.c b/dlls/gdiplus/matrix.c
index cc3507e..6d2e62c 100644
--- a/dlls/gdiplus/matrix.c
+++ b/dlls/gdiplus/matrix.c
@@ -366,3 +366,24 @@ GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix *matrix, GDIPCONST GpMa
 
     return Ok;
 }
+
+GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix *matrix, BOOL *result)
+{
+    GpMatrix *e;
+    GpStatus ret;
+    BOOL isIdentity;
+    
+    if(!matrix || !result)
+        return InvalidParameter;
+    
+    ret = GdipCreateMatrix(&e);
+    if(ret != Ok) return ret;
+    
+    ret = GdipIsMatrixEqual(matrix, e, &isIdentity);
+    if(ret == Ok)
+        *result = isIdentity;
+
+    GdipFree(e);
+
+    return ret;
+}
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 45dd47b..25ffe34 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -238,6 +238,7 @@ GpStatus WINGDIPAPI GdipCreateMatrix2(REAL,REAL,REAL,REAL,REAL,REAL,GpMatrix**);
 GpStatus WINGDIPAPI GdipCreateMatrix3(GDIPCONST GpRectF *,GDIPCONST GpPointF*,GpMatrix**);
 GpStatus WINGDIPAPI GdipCreateMatrix3I(GDIPCONST GpRect*,GDIPCONST GpPoint*,GpMatrix**);
 GpStatus WINGDIPAPI GdipIsMatrixEqual(GDIPCONST GpMatrix*, GDIPCONST GpMatrix*, BOOL*);
+GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix*, BOOL*);
 
 GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*);
 GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*);
-- 
1.4.4.4






More information about the wine-patches mailing list