This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients docs@python, gregorlingl, lijose, terry.reedy, willingc
Date 2020-01-24.23:22:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579908130.83.0.727094627609.issue39392@roundup.psfhosted.org>
In-reply-to
Content
Your SO question is essentially a duplicate.  As I answered there, the graphics systems of Unix and Windows, used by tk and hence tkinter, handle filling of self-intersecting polygons differently.  On Windows, if one draws a line from the outside to a particular region without going through an intersection, each line crossing toggles 'fill', starting with 'off' in the outside.

The rule seems to be reversed for overlapping items, such as circles.  On Windows, all three circles are yellow, whereas on macOS, the 60 circle is white, even if drawn last!

So, no bug.  The best we can do is document 'filling' for turtle.  Our tkinter doc does not include tk widgets, in particular Canvas, and we cannot edit external sources.

What happens with multiple fill colors?  Blended, or last wins?

# 1 fill block
from turtle import *
color('black', 'yellow')    
begin_fill()
circle(40)
color('black', 'red')    
circle(60)
color('black', 'blue')    
circle(80)
end_fill()

On Windows, 3 circles drawn, then all filled with blue.  The same is true if the circle order is reversed.

# multiple fill blocks
from turtle import *
color('black', 'yellow')    
begin_fill()
circle(40)
end_fill()
color('black', 'red')    
begin_fill()
circle(60)
end_fill()
color('black', 'blue')    
begin_fill()
circle(80)
end_fill()

On Windows, each circle fills with its color after it is drawn.  Same final result.  It is different if drawing order is reversed.  The rule seems to be: lines are drawn with the current line color; fill is done at the end of each fill block with the current (last) fill color.
History
Date User Action Args
2020-01-24 23:22:10terry.reedysetrecipients: + terry.reedy, gregorlingl, docs@python, willingc, lijose
2020-01-24 23:22:10terry.reedysetmessageid: <1579908130.83.0.727094627609.issue39392@roundup.psfhosted.org>
2020-01-24 23:22:10terry.reedylinkissue39392 messages
2020-01-24 23:22:10terry.reedycreate