Evan Stade : gdiplus: Updated GdipClonePen to clone pen's members by value, not reference.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Jul 20 06:02:36 CDT 2007


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

Author: Evan Stade <estade at gmail.com>
Date:   Thu Jul 19 18:23:08 2007 -0700

gdiplus: Updated GdipClonePen to clone pen's members by value, not reference.

---

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

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 join)
 
 GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
 {
-    LOGBRUSH lb;
-
     if(!pen || !clonepen)
         return InvalidParameter;
 
@@ -77,12 +75,13 @@ GpStatus WINGDIPAPI GdipClonePen(GpPen *pen, GpPen **clonepen)
 
     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;
 }




More information about the wine-cvs mailing list