mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-25 00:34:14 +03:00
Added test for a simple right triangle
The diagonals of the right angled edges must be perfect and the bottom vertice should be drawn.
This commit is contained in:
parent
ec74779b19
commit
e2cb2195eb
BIN
Tests/images/imagedraw/triangle_right.png
Normal file
BIN
Tests/images/imagedraw/triangle_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 168 B |
|
@ -63,3 +63,10 @@ def test_square():
|
|||
draw.rectangle((7, 7, 2, 2), BLACK)
|
||||
assert_image_equal(img, expected)
|
||||
|
||||
|
||||
def test_triangle_right():
|
||||
expected = Image.open(os.path.join(IMAGES_PATH, 'triangle_right.png'))
|
||||
expected.load()
|
||||
img, draw = create_base_image_draw((20, 20))
|
||||
draw.polygon([(3, 5), (17, 5), (10, 12)], BLACK)
|
||||
assert_image_equal(img, expected)
|
||||
|
|
Loading…
Reference in New Issue
Block a user