Reputation: 443
PIL.ImageDraw.arc(xy, start, end, fill, width)
xy – Two points to define the bounding box. Sequence of [(x0, y0), (x1, y1)] or [x0, y0, x1, y1], where x1 >= x0 and y1 >= y0.(from docs)
My code
image = Image.new('RGBA', (300, 300), (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
x0, y0, x1, y1 = (50, 200, 250, 200)
draw.arc((x0, y0, x1, y1), 0, 180, 'red')
print(x1 >= x0 and y1 >= y0) # -> True
but image is blank
Upvotes: 1
Views: 329
Reputation: 207425
I think your bounding box is a problem and you want something more akin to this:
image = Image.new('RGBA', (300, 400), (0, 0, 0, 0))
draw = ImageDraw.Draw(image)
bbox = (10, 50, 250, 300)
draw.arc(bbox, 0, 180, 'red')
Upvotes: 1