Alistair Leslie-Hughes : gdiplus: Implement GdipGetPenTransform.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 4 10:46:12 CST 2016


Module: wine
Branch: master
Commit: b8449062eb13ed27612ac3df8e05c67587bce12f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b8449062eb13ed27612ac3df8e05c67587bce12f

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Sun Jan 31 21:55:31 2016 +1100

gdiplus: Implement GdipGetPenTransform.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdiplus/gdiplus_private.h | 1 +
 dlls/gdiplus/pen.c             | 8 +++-----
 dlls/gdiplus/tests/pen.c       | 6 +++---
 3 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index 1af0bd0..0013d75 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -197,6 +197,7 @@ struct GpPen{
     REAL offset;    /* dash offset */
     GpBrush *brush;
     GpPenAlignment align;
+    GpMatrix transform;
 };
 
 struct GpGraphics{
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index f7dacef..47e91ec 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -171,6 +171,7 @@ GpStatus WINGDIPAPI GdipCreatePen2(GpBrush *brush, REAL width, GpUnit unit,
     gp_pen->offset = 0.0;
     gp_pen->customstart = NULL;
     gp_pen->customend = NULL;
+    GdipSetMatrixElements(&gp_pen->transform, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0);
 
     if(!((gp_pen->unit == UnitWorld) || (gp_pen->unit == UnitPixel))) {
         FIXME("UnitWorld, UnitPixel only supported units\n");
@@ -448,17 +449,14 @@ GpStatus WINGDIPAPI GdipSetPenTransform(GpPen *pen, GpMatrix *matrix)
 
 GpStatus WINGDIPAPI GdipGetPenTransform(GpPen *pen, GpMatrix *matrix)
 {
-    static int calls;
-
     TRACE("(%p,%p)\n", pen, matrix);
 
     if(!pen || !matrix)
         return InvalidParameter;
 
-    if(!(calls++))
-        FIXME("not implemented\n");
+    *matrix = pen->transform;
 
-    return NotImplemented;
+    return Ok;
 }
 
 GpStatus WINGDIPAPI GdipTranslatePenTransform(GpPen *pen, REAL dx, REAL dy, GpMatrixOrder order)
diff --git a/dlls/gdiplus/tests/pen.c b/dlls/gdiplus/tests/pen.c
index 6eee2ea..1e63560 100644
--- a/dlls/gdiplus/tests/pen.c
+++ b/dlls/gdiplus/tests/pen.c
@@ -380,7 +380,7 @@ static void test_transform(void)
     expect(Ok, status);
 
     status = GdipGetPenTransform(pen, matrix);
-    todo_wine expect(Ok, status);
+    expect(Ok, status);
 
     status = GdipGetMatrixElements(matrix, values);
     expect(Ok, status);
@@ -398,7 +398,7 @@ static void test_transform(void)
     GdipDeleteMatrix(matrix2);
 
     status = GdipGetPenTransform(pen, matrix);
-    todo_wine expect(Ok, status);
+    expect(Ok, status);
     status = GdipGetMatrixElements(matrix, values);
     expect(Ok, status);
 todo_wine {
@@ -413,7 +413,7 @@ todo_wine {
     todo_wine expect(Ok, status);
 
     status = GdipGetPenTransform(pen, matrix);
-    todo_wine expect(Ok, status);
+    expect(Ok, status);
     status = GdipGetMatrixElements(matrix, values);
     expect(Ok, status);
 




More information about the wine-cvs mailing list