[13/17] gdiplus: updated GdipClonePen

Evan Stade estade at gmail.com
Thu Jul 19 20:23:08 CDT 2007


Hi,

changelog:
*updated GdipClonePen to clone pen's members by value, not reference

 dlls/gdiplus/pen.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

-- 
Evan Stade
-------------- next part --------------
diff --git a/dlls/gdiplus/pen.c b/dlls/gdiplus/pen.c
index da6a482..7b14595 100644
--- a/dlls/gdiplus/pen.c
+++ b/dlls/gdiplus/pen.c
@@ -67,8 +67,6 @@ static DWORD gdip_to_gdi_join(GpLineJoin
 
 GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
 {
-    LOGBRUSH lb;
-
     if(!pen || !clonepen)
         return InvalidParameter;
 
@@ -77,12 +75,13 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *
 
     memcpy(*clonepen, pen, sizeof(GpPen));
 
-    lb.lbStyle = BS_SOLID;
-    lb.lbColor = (*clonepen)->color;
-    lb.lbHatch = 0;
+    GdipCloneCustomLineCap(pen->customstart, &(*clonepen)->customstart);
+    GdipCloneCustomLineCap(pen->customend, &(*clonepen)->customend);
+    GdipCloneBrush(pen->brush, &(*clonepen)->brush);
 
     (*clonepen)->gdipen = ExtCreatePen((*clonepen)->style,
-                                       roundr((*clonepen)->width), &lb, 0, NULL);
+                                       roundr((*clonepen)->width),
+                                       &(*clonepen)->brush->lb, 0, NULL);
 
     return Ok;
 }
-- 
1.4.1


More information about the wine-patches mailing list