You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Draw a rectangle with a color with opacity < 1 for border (e.g. outline='#0000ffaa')
What did you expect to happen?
The border color should be homogenous, and not altered by the fill color, if set.
What actually happened?
The border color is different in the corners, probably due to overlapping line segments.
Moreover, when a fill color is set, the border color is changed due to the overlap of the border and fill rectangle.
The text was updated successfully, but these errors were encountered:
radarhere
changed the title
incorrect border color in corners when drawing rectangles with border color with opacity < 1
Incorrect border color in corners when drawing rectangles with border color with opacity < 1
Jan 5, 2021
For my part at least, I'm not convinced that a translucent outline shouldn't be drawn on top of the fill color? Seems like that decision could go either way.
For my part at least, I'm not convinced that a translucent outline shouldn't be drawn on top of the fill color? Seems like that decision could go either way.
What did you do?
Draw a rectangle with a color with opacity < 1 for border (e.g.
outline='#0000ffaa'
)What did you expect to happen?
The border color should be homogenous, and not altered by the
fill
color, if set.What actually happened?
The border color is different in the corners, probably due to overlapping line segments.
Moreover, when a
fill
color is set, the border color is changed due to the overlap of the border and fill rectangle.What are your OS, Python and Pillow versions?
Example
Code
Result
Related Sources
Pillow/src/PIL/ImageDraw.py
Lines 255 to 258 in d374015
Pillow/src/_imaging.c
Lines 3171 to 3180 in d374015
Pillow/src/libImaging/Draw.c
Lines 724 to 729 in d374015
The text was updated successfully, but these errors were encountered: