[2/8] gdiplus: added GdipGetPenDashStyle

Evan Stade estade at gmail.com
Tue Jul 17 21:31:01 CDT 2007


Hi,

 dlls/gdiplus/gdiplus.spec |    2 +-
 dlls/gdiplus/pen.c        |   12 +++++++++++-
 include/gdiplusflat.h     |    1 +
 3 files changed, 13 insertions(+), 2 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index ee1a576..9bc5122 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -342,7 +342,7 @@
 @ stub GdipGetPenDashCap197819
 @ stub GdipGetPenDashCount
 @ stub GdipGetPenDashOffset
-@ stub GdipGetPenDashStyle
+@ stdcall GdipGetPenDashStyle(ptr ptr)
 @ stub GdipGetPenEndCap
 @ stub GdipGetPenFillType
 @ stub GdipGetPenLineJoin
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index a2cbff5..52ee8e2 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -106,8 +106,8 @@ GpStatus WINGDIPAPI GdipCreatePen1(ARGB 
     gp_pen->endcap = LineCapFlat;
     gp_pen->join = LineJoinMiter;
     gp_pen->miterlimit = 10.0;
+    gp_pen->dash = DashStyleSolid;
 
-    /* FIXME: Currently only solid lines supported. */
     lb.lbStyle = BS_SOLID;
     lb.lbColor = gp_pen->color;
     lb.lbHatch = 0;
@@ -135,6 +135,16 @@ GpStatus WINGDIPAPI GdipDeletePen(GpPen 
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dash)
+{
+    if(!pen || !dash)
+        return InvalidParameter;
+
+    *dash = pen->dash;
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash)
 {
     LOGBRUSH lb;
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 8388f95..a358a1e 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -30,6 +30,7 @@ #endif
 GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**);
 GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**);
 GpStatus WINGDIPAPI GdipDeletePen(GpPen*);
+GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*);
 GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle);
 GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen*,GpLineCap);
 GpStatus WINGDIPAPI GdipSetPenLineCap197819(GpPen*,GpLineCap,GpLineCap,GpDashCap);
-- 
1.4.1


More information about the wine-patches mailing list