Python PIL | ImageDraw.Draw.chord()
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The
ImageDraw module provide simple 2D graphics for Image objects. You can use this module to create new images, annotate or retouch existing images, and to generate graphics on the fly for web use.
ImageDraw.Draw.chord() Same as
arc(), but connects the end points with a straight line.
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning - Basic Level Course
Syntax: PIL.ImageDraw.Draw.chord(xy, start, end, fill=None, outline=None)
xy – Four points to define the bounding box. Sequence of [(x0, y0), (x1, y1)] or [x0, y0, x1, y1].
outline – Color to use for the outline.
fill – Color to use for the fill.
Returns: An Image.
Another Example: Here we use different colour for filling.