Tk Source Code

Artifact [719487ac91]
Login

Artifact 719487ac917856e4937b4ecaa44cca0a0587765ca60e8c732154c0a5fcfa807d:

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;