Attachment "4a59d535d1c0e.diff" to
ticket [4a59d535d1]
added by
chrstphrchvz
2022-08-09 16:57:28.
diff --git macosx/tkMacOSXDraw.c macosx/tkMacOSXDraw.c
index 92b0d4fd6..aa09d5405 100644
--- macosx/tkMacOSXDraw.c
+++ macosx/tkMacOSXDraw.c
@@ -489,7 +489,7 @@ XDrawSegments(
*
* XFillPolygon --
*
- * Draws a filled polygon using the even-odd fill algorithm,
+ * Draws a filled polygon.
*
* Results:
* None.
@@ -537,7 +537,9 @@ XFillPolygon(
CGContextAddLineToPoint(dc.context, prevx, prevy);
}
}
- CGContextEOFillPath(dc.context);
+ (gc->fill_rule == EvenOddRule)
+ ? CGContextEOFillPath(dc.context)
+ : CGContextFillPath(dc.context);
}
TkMacOSXRestoreDrawingContext(&dc);
return Success;