mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 02:06:18 +03:00
Added test for polygon edge drawing
This commit is contained in:
parent
16261beeba
commit
a1b71d5ee0
BIN
Tests/images/imagedraw_ellipse_edge.png
Normal file
BIN
Tests/images/imagedraw_ellipse_edge.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 602 B |
|
@ -124,6 +124,19 @@ class TestImageDraw(PillowTestCase):
|
||||||
def test_ellipse2(self):
|
def test_ellipse2(self):
|
||||||
self.helper_ellipse(BBOX2)
|
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):
|
def helper_line(self, points):
|
||||||
# Arrange
|
# Arrange
|
||||||
im = Image.new("RGB", (W, H))
|
im = Image.new("RGB", (W, H))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user