gdiplus: Implemented Gdip[Get/Set]PenMode

Nikolay Sivov bunglehead at gmail.com
Thu Jul 31 00:08:32 CDT 2008


Changelog:
    - Added Gdip[Get/Set]PenMode

---
 dlls/gdiplus/gdiplus.spec      |    2 +-
 dlls/gdiplus/gdiplus_private.h |    1 +
 dlls/gdiplus/pen.c             |   15 ++++++++++++---
 include/gdiplusflat.h          |    2 ++
 4 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 661cb8f..48d46a3 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -363,7 +363,7 @@
 @ stub GdipGetPenFillType
 @ stdcall GdipGetPenLineJoin(ptr ptr)
 @ stdcall GdipGetPenMiterLimit(ptr ptr)
-@ stub GdipGetPenMode
+@ stdcall GdipGetPenMode(ptr ptr)
 @ stdcall GdipGetPenStartCap(ptr ptr)
 @ stub GdipGetPenTransform
 @ stdcall GdipGetPenUnit(ptr ptr)
diff --git a/dlls/gdiplus/gdiplus_private.h b/dlls/gdiplus/gdiplus_private.h
index b445a58..8fe8862 100644
--- a/dlls/gdiplus/gdiplus_private.h
+++ b/dlls/gdiplus/gdiplus_private.h
@@ -72,6 +72,7 @@ struct GpPen{
     INT numdashes;
     REAL offset;    /* dash offset */
     GpBrush *brush;
+    GpPenAlignment align;
 };
 
 struct GpGraphics{
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index df2d040..829b191 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -237,6 +237,16 @@ GpStatus WINGDIPAPI GdipGetPenLineJoin(GpPen *pen, GpLineJoin *lineJoin)
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipGetPenMode(GpPen *pen, GpPenAlignment *mode)
+{
+    if(!pen || !mode)
+        return InvalidParameter;
+
+    *mode = pen->align;
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipGetPenMiterLimit(GpPen *pen, REAL *miterLimit)
 {
     if(!pen || !miterLimit)
@@ -481,12 +491,11 @@ GpStatus WINGDIPAPI GdipSetPenWidth(GpPen *pen, REAL width)
     return Ok;
 }
 
-
-GpStatus WINGDIPAPI GdipSetPenMode(GpPen *pen, GpPenAlignment penAlignment)
+GpStatus WINGDIPAPI GdipSetPenMode(GpPen *pen, GpPenAlignment mode)
 {
     if(!pen)    return InvalidParameter;
 
-    FIXME("stub (%d)\n", penAlignment);
+    pen->align = mode;
 
     return Ok;
 }
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index f5705a7..2e0d743 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -37,6 +37,7 @@ GpStatus WINGDIPAPI GdipGetPenDashArray(GpPen*,REAL*,INT);
 GpStatus WINGDIPAPI GdipGetPenDashCount(GpPen*,INT*);
 GpStatus WINGDIPAPI GdipGetPenDashOffset(GpPen*,REAL*);
 GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*);
+GpStatus WINGDIPAPI GdipGetPenMode(GpPen*,GpPenAlignment*);
 GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*);
 GpStatus WINGDIPAPI GdipSetPenColor(GpPen*,ARGB);
 GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen*,GpCustomLineCap*);
@@ -48,6 +49,7 @@ GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle);
 GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen*,GpLineCap);
 GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen*,GpLineCap,GpLineCap,GpDashCap);
 GpStatus WINGDIPAPI GdipSetPenLineJoin(GpPen*,GpLineJoin);
+GpStatus WINGDIPAPI GdipSetPenMode(GpPen*,GpPenAlignment);
 GpStatus WINGDIPAPI GdipSetPenMiterLimit(GpPen*,REAL);
 GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen*,GpLineCap);
 GpStatus WINGDIPAPI GdipSetPenWidth(GpPen*,REAL);
-- 
1.4.4.4






More information about the wine-patches mailing list