From 510c26ac1dbcdd4ce87993ff5d2232279b532ac1 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 30 Apr 2008 01:28:40 +0400 Subject: [PATCH] gdiplus: Implemented GdipMultiplyWorldTransform. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.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 c4d26f2e6db..116f5f7dfb4 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -447,7 +447,7 @@ @ stub GdipMultiplyPathGradientTransform @ stub GdipMultiplyPenTransform @ stub GdipMultiplyTextureTransform -@ stub GdipMultiplyWorldTransform +@ stdcall GdipMultiplyWorldTransform(ptr ptr long) @ stub GdipNewInstalledFontCollection @ stub GdipNewPrivateFontCollection @ stdcall GdipPathIterCopyData(ptr ptr ptr ptr long long) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 2646a464763..416741c2d0d 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2418,3 +2418,21 @@ GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics *graphics, REAL* dpi) return Ok; } + +GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics *graphics, GDIPCONST GpMatrix *matrix, + GpMatrixOrder order) +{ + GpMatrix m; + GpStatus ret; + + if(!graphics || !matrix) + return InvalidParameter; + + m = *(graphics->worldtrans); + + ret = GdipMultiplyMatrix(&m, (GpMatrix*)matrix, order); + if(ret == Ok) + *(graphics->worldtrans) = m; + + return ret; +} diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index 25ffe34374e..495c9554e26 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -243,6 +243,7 @@ GpStatus WINGDIPAPI GdipIsMatrixIdentity(GDIPCONST GpMatrix*, BOOL*); GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix*); GpStatus WINGDIPAPI GdipGetMatrixElements(GDIPCONST GpMatrix*,REAL*); GpStatus WINGDIPAPI GdipMultiplyMatrix(GpMatrix*,GpMatrix*,GpMatrixOrder); +GpStatus WINGDIPAPI GdipMultiplyWorldTransform(GpGraphics*,GDIPCONST 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);