Added test for polygon edge drawing

This commit is contained in:
Andrew Murray 2015-06-06 00:46:50 +10:00
parent 16261beeba
commit a1b71d5ee0
2 changed files with 13 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

View File

@ -124,6 +124,19 @@ class TestImageDraw(PillowTestCase):
def test_ellipse2(self):
self.helper_ellipse(BBOX2)
def test_ellipse_edge(self):
# Arrange
im = Image.new("RGB", (W, H))
draw = ImageDraw.Draw(im)
# Act
draw.ellipse(((0, 0), (W-1, H)), fill="white")
del draw
# Assert
self.assert_image_similar(
im, Image.open("Tests/images/imagedraw_ellipse_edge.png"), 1)
def helper_line(self, points):
# Arrange
im = Image.new("RGB", (W, H))