summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-08-24 19:30:34 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-08-24 19:30:34 (GMT)
commitdff4ae6a604838f20e92f3c15f476ea05bd38fec (patch)
treedeca868333743abf0bd61f88f44423bdab6e2931 /macosx
parent17fd24a6b2a649dca794ec65683b355c03b6d015 (diff)
parent0f3176d9ab642b4c8fded958b542546aa7ffb0d0 (diff)
downloadtk-dff4ae6a604838f20e92f3c15f476ea05bd38fec.zip
tk-dff4ae6a604838f20e92f3c15f476ea05bd38fec.tar.gz
tk-dff4ae6a604838f20e92f3c15f476ea05bd38fec.tar.bz2
polygon and closed polylines in canvas don't fully honor -joinstyle on Windows and OS X
Diffstat (limited to 'macosx')
-rw-r--r--macosx/tkMacOSXDraw.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 5ca8bfe..d1e67dc 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -858,6 +858,16 @@ XDrawLines(
CGContextAddLineToPoint(dc.context, prevx, prevy);
}
}
+ /*
+ * In the case of closed polylines, the first and last points
+ * are the same. We want miter or bevel join be rendered also
+ * at this point, this needs telling CoreGraphics that the
+ * path is closed.
+ */
+ if ((points[0].x == points[npoints-1].x) &&
+ (points[0].y == points[npoints-1].y)) {
+ CGContextClosePath(dc.context);
+ }
CGContextStrokePath(dc.context);
}
TkMacOSXRestoreDrawingContext(&dc);