Module: wine Branch: master Commit: 31847cf30b23720cb09e9f2861ce58087ad5bf69 URL: http://source.winehq.org/git/wine.git/?a=commit;h=31847cf30b23720cb09e9f2861...
Author: Nikolay Sivov bunglehead@gmail.com Date: Thu Sep 25 08:57:55 2008 +0400
gdiplus: Implemented GdipResetTextureTransform.
---
dlls/gdiplus/brush.c | 13 +++++++++++++ dlls/gdiplus/gdiplus.spec | 2 +- dlls/gdiplus/tests/brush.c | 8 ++++++++ include/gdiplusflat.h | 1 + 4 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/dlls/gdiplus/brush.c b/dlls/gdiplus/brush.c index 3421105..d08fdab 100644 --- a/dlls/gdiplus/brush.c +++ b/dlls/gdiplus/brush.c @@ -898,6 +898,19 @@ GpStatus WINGDIPAPI GdipGetTextureTransform(GpTexture *brush, GpMatrix *matrix) return Ok; }
+/****************************************************************************** + * GdipResetTextureTransform [GDIPLUS.@] + */ +GpStatus WINGDIPAPI GdipResetTextureTransform(GpTexture* brush) +{ + TRACE("(%p)\n", brush); + + if(!brush) + return InvalidParameter; + + return GdipSetMatrixElements(brush->transform, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0); +} + GpStatus WINGDIPAPI GdipSetLineBlend(GpLineGradient *brush, GDIPCONST REAL *blend, GDIPCONST REAL* positions, INT count) { diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec index 4558a6b..1fe0c8e 100644 --- a/dlls/gdiplus/gdiplus.spec +++ b/dlls/gdiplus/gdiplus.spec @@ -481,7 +481,7 @@ @ stdcall GdipResetPath(ptr) @ stub GdipResetPathGradientTransform @ stub GdipResetPenTransform -@ stub GdipResetTextureTransform +@ stdcall GdipResetTextureTransform(ptr) @ stdcall GdipResetWorldTransform(ptr) @ stdcall GdipRestoreGraphics(ptr long) @ stdcall GdipReversePath(ptr) diff --git a/dlls/gdiplus/tests/brush.c b/dlls/gdiplus/tests/brush.c index c69bb99..9dd343b 100644 --- a/dlls/gdiplus/tests/brush.c +++ b/dlls/gdiplus/tests/brush.c @@ -212,6 +212,14 @@ static void test_transform(void) status = GdipIsMatrixEqual(m, m1, &res); expect(Ok, status); expect(TRUE, res); + /* reset */ + status = GdipResetTextureTransform(texture); + expect(Ok, status); + status = GdipGetTextureTransform(texture, m); + expect(Ok, status); + status = GdipIsMatrixIdentity(m, &res); + expect(Ok, status); + expect(TRUE, res);
status = GdipDeleteBrush((GpBrush*)texture); expect(Ok, status); diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h index bc68aae..a888f90 100644 --- a/include/gdiplusflat.h +++ b/include/gdiplusflat.h @@ -248,6 +248,7 @@ GpStatus WINGDIPAPI GdipSetPathGradientSurroundColorsWithCount(GpPathGradient*, GpStatus WINGDIPAPI GdipSetPathGradientWrapMode(GpPathGradient*,GpWrapMode); GpStatus WINGDIPAPI GdipSetSolidFillColor(GpSolidFill*,ARGB); GpStatus WINGDIPAPI GdipSetTextureTransform(GpTexture *,GDIPCONST GpMatrix*); +GpStatus WINGDIPAPI GdipResetTextureTransform(GpTexture*); GpStatus WINGDIPAPI GdipTransformPoints(GpGraphics*, GpCoordinateSpace, GpCoordinateSpace, GpPointF *, INT); GpStatus WINGDIPAPI GdipTransformPointsI(GpGraphics*, GpCoordinateSpace, GpCoordinateSpace,