Evan Stade : gdiplus: Added GdipSetPenBrushFill.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 24 07:06:21 CDT 2007


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

Author: Evan Stade <estade at gmail.com>
Date:   Mon Jul 23 20:23:52 2007 -0700

gdiplus: Added GdipSetPenBrushFill.

---

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

diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
index 66f4de2..4fa3d89 100644
--- a/dlls/gdiplus/gdiplus.spec
+++ b/dlls/gdiplus/gdiplus.spec
@@ -541,7 +541,7 @@
 @ stub GdipSetPathGradientTransform
 @ stub GdipSetPathGradientWrapMode
 @ stub GdipSetPathMarker
-@ stub GdipSetPenBrushFill
+@ stdcall GdipSetPenBrushFill(ptr ptr)
 @ stub GdipSetPenColor
 @ stub GdipSetPenCompoundArray
 @ stdcall GdipSetPenCustomEndCap(ptr ptr)
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index c003076..8817c1b 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -144,6 +144,25 @@ GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen *pen, GpDashStyle *dash)
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen *pen, GpBrush *brush)
+{
+    GpStatus retval;
+
+    if(!pen || !brush)
+        return InvalidParameter;
+
+    GdipDeleteBrush(pen->brush);
+    retval = GdipCloneBrush(brush, &pen->brush);
+    if(retval != Ok)
+        return retval;
+
+    DeleteObject(pen->gdipen);
+    pen->gdipen = ExtCreatePen(pen->style, roundr(pen->width), &pen->brush->lb, 0,
+                               NULL);
+
+    return Ok;
+}
+
 GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap* customCap)
 {
     GpCustomLineCap * cap;
diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
index 31d973b..63a3873 100644
--- a/include/gdiplusflat.h
+++ b/include/gdiplusflat.h
@@ -31,6 +31,7 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen*,GpPen**);
 GpStatus WINGDIPAPI GdipCreatePen1(ARGB,REAL,GpUnit,GpPen**);
 GpStatus WINGDIPAPI GdipDeletePen(GpPen*);
 GpStatus WINGDIPAPI GdipGetPenDashStyle(GpPen*,GpDashStyle*);
+GpStatus WINGDIPAPI GdipSetPenBrushFill(GpPen*,GpBrush*);
 GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen*,GpCustomLineCap*);
 GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen*,GpCustomLineCap*);
 GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen*,GpDashStyle);




More information about the wine-cvs mailing list