[4/4] gdiplus: implemented GdipResetTextureTransform
Nikolay Sivov
bunglehead at gmail.com
Thu Sep 25 00:08:18 CDT 2008
Changelog:
- implement GdipResetTextureTransform
>From 83bb6e8522c505c7e26419a502e6045b52c88790 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <bunglehead at gmail.com>
Date: Thu, 25 Sep 2008 08:57:55 +0400
Subject: Implement 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 de26090..e288bbe 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,
--
1.4.4.4
More information about the wine-patches
mailing list