From 93f6601d033f5df57f14db13c744ce2eabe33e7a Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 30 Apr 2008 01:28:35 +0400 Subject: [PATCH] gdiplus: Implemented GdipIsMatrixIdentity. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/matrix.c | 21 +++++++++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index e1371caa78..c4d26f2e6d 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 cc3507e3a0..a8617db85a 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 45dd47b798..25ffe34374 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*); -- 2.33.8