The objects of canvas.T
class and its subclasses
provides several methods that
can be invoked manually to draw variety of
things if you desire so.
linestyle, x1, y1, x2, y2) |
# draw a line segment from (10,20) to (100, 200) can.line(line_style.blackdash1, 10, 20, 100, 200)
linestyle, fillstyle, [(x1,y1), ..., (xn, yn)]) |
Draw a polygon with linestyle ( see Section 14), fill with fillstyle (see Section 16), and the edges points. Parameter points is a list of coordinates, e.g., ((10,10), (15,5), (20,8)). Value of linestyle can be None, in which case no perimeter lines are drawn. Value of fillstyle can also be None, in which the internal of the polygon are left undrawn. Parameter shadow is either None or tuple (xdelta, ydelta, shadowstyle). If non-None, a shadow of shadowstyle (see Section 16) is drawn beneath the polygon at the offset of (xdelta, ydelta).
can.polygon(line_style.default, fill_style.default, [(10, 20), (100, 200), (300,300)])
linestyle, fillstyle, x1, y1, x2, y2, shadow=None) |
Parameter shadow is either None or tuple (xdelta, ydelta, shadowstyle). If non-None, a shadow of shadowstyle ( see Section 16) is drawn beneath the polygon at the offset of (xdelta, ydelta).
can.rectangle(line_style.default, fill_style.default, 10, 20, 300, 300)
linestyle, fillstyle, x, y, radius, y_elongation=1, start=0, end=360, shadow=None) |
The start and end angles are specified in degrees; i.e., between 0 and 360. Parameter shadow is either None or tuple (xdelta, ydelta, shadowstyle). If non-None, a shadow of shadowstyle ( see Section 16) is drawn beneath the polygon at the offset of (xdelta, ydelta).
linestyle, fillstyle, x1, y2, x2, y2, radius, shadow=None) |
Parameter shadow is either None or tuple (xdelta, ydelta, shadowstyle). If non-None, a shadow of shadowstyle ( see Section 16) is drawn beneath the polygon at the offset of (xdelta, ydelta).
linestyle, [(x1,y2), ..., (xn, yn)]) |
x, y, text) |
str) |