pibo_graphics · Turtle graphics

A class for graphics similar to the Turtle package. Tested at: 240x320 (PiBrain)

Class: PiboGraphics

class openpibo.pibo_graphics.PiboGraphics(view_instance, width=240, height=320, animation_delay=0.01, move_step_size=2, turn_step_size=5, icon_path=openpibo_models.filepath)[source]

Bases: object

reset(show_initial=True)[source]

Clears screen and history, resets state.

clear()[source]

Clears drawing area (history), redraws icon, shows.

bgcolor(b, g, r)[source]

Sets background color and clears screen/history.

penup()[source]
pendown()[source]
pencolor(b, g, r)[source]
pensize(width)[source]
forward(distance)[source]

Moves forward step-by-step, adding to history if pen down.

backward(distance)[source]
left(angle)[source]

Turns left step-by-step, updating icon display.

right(angle)[source]
setheading(angle)[source]

Sets absolute heading instantly, updates display.

goto(x, y)[source]

Goes instantly, adds line to history if pen down.

circle(radius, extent=360)[source]

Adds circle/arc to history if pen down.

dot(size=None, color_bgr=None)[source]

Adds dot to history.