Evan Stade : gdiplus: Fixed bug drawing custom caps.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 8 08:59:50 CDT 2007


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

Author: Evan Stade <estade at gmail.com>
Date:   Tue Aug  7 18:42:44 2007 -0700

gdiplus: Fixed bug drawing custom caps.

---

 dlls/gdiplus/graphics.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 3afdab2..0059cc3 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -488,7 +488,7 @@ static GpStatus draw_polyline(GpGraphics *graphics, GpPen *pen,
         else if((pen->startcap == LineCapCustom) && pen->customstart)
             shorten_line_amt(ptcopy[1].X, ptcopy[1].Y,
                              &ptcopy[0].X, &ptcopy[0].Y,
-                             pen->customend->inset * pen->width);
+                             pen->customstart->inset * pen->width);
 
         draw_cap(graphics, pen->brush->lb.lbColor, pen->endcap, pen->width, pen->customend,
                  pt[count - 2].X, pt[count - 2].Y, pt[count - 1].X, pt[count - 1].Y);
@@ -582,7 +582,7 @@ static GpStatus draw_polybezier(GpGraphics *graphics, GpPen *pen,
         if(pen->startcap == LineCapArrowAnchor)
             shorten_bezier_amt(ptcopy, pen->width, TRUE);
         else if((pen->startcap == LineCapCustom) && pen->customstart)
-            shorten_bezier_amt(ptcopy, pen->width * pen->customend->inset, TRUE);
+            shorten_bezier_amt(ptcopy, pen->width * pen->customstart->inset, TRUE);
 
         /* the direction of the line cap is parallel to the direction at the
          * end of the bezier (which, if it has been shortened, is not the same
@@ -689,7 +689,7 @@ static GpStatus draw_poly(GpGraphics *graphics, GpPen *pen, GDIPCONST GpPointF *
                     shorten_bezier_amt(&ptcopy[j - 1], pen->width, TRUE);
                 else if((pen->startcap == LineCapCustom) && pen->customstart)
                     shorten_bezier_amt(&ptcopy[j - 1],
-                                       pen->width * pen->customend->inset, TRUE);
+                                       pen->width * pen->customstart->inset, TRUE);
 
                 draw_cap(graphics, pen->brush->lb.lbColor, pen->startcap, pen->width, pen->customstart,
                     pt[j - 1].X - (ptcopy[j - 1].X - ptcopy[j].X),




More information about the wine-cvs mailing list