mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Test experimental floodfill with a border
This commit is contained in:
parent
961db29ff6
commit
5b55cb72d3
BIN
Tests/images/imagedraw_floodfill2.png
Normal file
BIN
Tests/images/imagedraw_floodfill2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 212 B |
|
@ -235,4 +235,21 @@ def test_floodfill():
|
|||
assert_image_equal(im, Image.open("Tests/images/imagedraw_floodfill.png"))
|
||||
|
||||
|
||||
def test_floodfill_border():
|
||||
# Arrange
|
||||
im = Image.new("RGB", (w, h))
|
||||
draw = ImageDraw.Draw(im)
|
||||
draw.rectangle(bbox2, outline="yellow", fill="green")
|
||||
centre_point = (int(w/2), int(h/2))
|
||||
|
||||
# Act
|
||||
ImageDraw.floodfill(
|
||||
im, centre_point, ImageColor.getrgb("red"),
|
||||
border=ImageColor.getrgb("black"))
|
||||
del draw
|
||||
|
||||
# Assert
|
||||
assert_image_equal(im, Image.open("Tests/images/imagedraw_floodfill2.png"))
|
||||
|
||||
|
||||
# End of file
|
||||
|
|
Loading…
Reference in New Issue
Block a user