summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-08-21 17:04:15 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-08-21 17:04:15 (GMT)
commite14d9cf336bad179aac9e69d64fbfbca56d7dde7 (patch)
tree061f10e8ae8b7b6f33ef16356b2e856b8c533bee /macosx/tkMacOSXDraw.c
parente007a4242506207d5eacef0f7d28047c455a969e (diff)
downloadtk-e14d9cf336bad179aac9e69d64fbfbca56d7dde7.zip
tk-e14d9cf336bad179aac9e69d64fbfbca56d7dde7.tar.gz
tk-e14d9cf336bad179aac9e69d64fbfbca56d7dde7.tar.bz2
Fix [4a59d535d1]: Aqua: XFillPolygon() winding rule fill support. Thanks to Christopher Chavez.
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index aa3ed16..874d3cc 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -514,7 +514,7 @@ XDrawSegments(
*
* XFillPolygon --
*
- * Draws a filled polygon using the even-odd fill algorithm,
+ * Draws a filled polygon.
*
* Results:
* None.
@@ -562,7 +562,9 @@ XFillPolygon(
CGContextAddLineToPoint(dc.context, prevx, prevy);
}
}
- CGContextEOFillPath(dc.context);
+ (gc->fill_rule == EvenOddRule)
+ ? CGContextEOFillPath(dc.context)
+ : CGContextFillPath(dc.context);
}
TkMacOSXRestoreDrawingContext(&dc);
return Success;