From 169e87d87933bd43565948b97e1536968187b9b1 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 6 Aug 2008 18:36:16 +0400 Subject: [PATCH] gdiplus: Implemented GdipResetWorldTransform. --- dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/graphics.c | 15 +++++++++++++++ include/gdiplusflat.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 5ac1f1a7be7..d3eaeb6ae5e 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -482,7 +482,7 @@ @ stub GdipResetPathGradientTransform @ stub GdipResetPenTransform @ stub GdipResetTextureTransform -@ stub GdipResetWorldTransform +@ stdcall GdipResetWorldTransform(ptr) @ stdcall GdipRestoreGraphics(ptr long) @ stdcall GdipReversePath(ptr) @ stub GdipRotateLineTransform diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 2450b479504..3a7ffcee7d6 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -2343,6 +2343,21 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics, return Ok; } +GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics *graphics) +{ + if(!graphics) + return InvalidParameter; + + graphics->worldtrans->matrix[0] = 1.0; + graphics->worldtrans->matrix[1] = 0.0; + graphics->worldtrans->matrix[2] = 0.0; + graphics->worldtrans->matrix[3] = 1.0; + graphics->worldtrans->matrix[4] = 0.0; + graphics->worldtrans->matrix[5] = 0.0; + + return Ok; +} + GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics *graphics, GraphicsState state) { static int calls; diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index c0be696438c..3fc76572f84 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -166,6 +166,7 @@ GpStatus WINGDIPAPI GdipMeasureCharacterRanges(GpGraphics*, GDIPCONST WCHAR*, GpRegion**); GpStatus WINGDIPAPI GdipReleaseDC(GpGraphics*,HDC); +GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics*); GpStatus WINGDIPAPI GdipRestoreGraphics(GpGraphics*,GraphicsState); GpStatus WINGDIPAPI GdipRotateWorldTransform(GpGraphics*,REAL,GpMatrixOrder); GpStatus WINGDIPAPI GdipSaveGraphics(GpGraphics*,GraphicsState*);