graphics object

A shape in graphics.py, such as a Point, Line, Circle, Rectangle, Oval, Polygon or Text, which you construct and then draw in a window.

In more detail

Constructing a shape only creates it in memory; draw(win) makes it visible and undraw removes it. All graphics objects share methods such as setFill, setOutline, setWidth, move and clone. A Rectangle and an Oval are defined by two opposite corners of their bounding box.

Example

c = Circle(Point(100, 100), 30)
c.setFill("red")
c.draw(win)

Related terms

Taught in

References