| |
- arc_path(x, y, angle1, angle2, radius, ndivs=10)
- Returns the points for a round corner
x -- x-coordinate of arc center
y -- y-coordinate of arc center
angle1 -- starting angle of arc
angle2 -- ending angle of arc
radius -- radius of arc
ndivs -- number of divisions for arc
- arrow(headx, heady, tailx, taily, *tail, **options)
- Draws an arrow
headx -- x-coordinate of the arrow head
heady -- y-coordinate of the arrow head
tailx -- x-coordinate of the arrow tail
taily -- y-coordinate of the arrow tail
*tail -- additional tail points
style -- arrow style. choose from: 'solid'
(only one implemented currently)
head_size -- size of arrow head (default: 10)
offset -- place arrow head an a different location (x, y)
(default: (headx, heady))
- arrow_head(headx, heady, tailx, taily, size=10)
- Draws a triangular arrow head
headx -- x-coordinate of the arrow head
heady -- y-coordinate of the arrow head
tailx -- x-coordinate of the arrow tail
taily -- y-coordinate of the arrow tail
size -- size of arrow head
- bezier(x0, x1, x2, x3, t)
- bezier_curve(control_pts, ndivs=20)
- box(x1, y1, x2, y2, fill=True)
- Draws a rectangle (aligned with the x and y axis)
x1, y1 -- one corner of rectangle
x2, y2 -- the opposite corner of the rectangle
fill -- a bool indicating whether the rectangle is filled or stroked
- get_time = time(...)
- time() -> floating point number
Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.
- lerp(x0, x1, t)
- regular_polygon(x, y, nsides, radius, fill=True, rotate=0.0)
- Draws a regular 'nsides'-sided polygon with size 'radius'
x, y -- a point that defines the center of the polygon
fill -- a bool indicating whether polygon is filled or stroked
rotate -- the number of degrees to rotate the polygon counter-clockwise
- round_box(x1, y1, x2, y2, radius, ndivs=10, fill=True)
- Draws a round rectanged (aligned with the x and y axis)
x1, y1 -- one corner of rectangle
x2, y2 -- the opposite corner of the rectangle
radius -- the radius of the rounded corner
if radius is a list of 4 floats, it will be used to specify
a radius for each corner (NW, NE, SE, SW)
ndivs -- number of divisions for each corner
fill -- a bool indicating whether the rectangle is filled or stroked
|