Drawing any shape
Racelogic provides a module called shapes.py to allow the easy creation of both regular shapes and non-regular shapes. It allows you to create them, rotate them, move them and fill them with any colour. An example of usage of this program is below:
import gui
import shapes
# creating a regular hexagon that has a purple fill and a black outline
Reg_Hexagon = shapes.Reg_Shape([300, 250], 45, True, gui.RGB(0,0,0), gui.RGB(255,0,255), 50, 6)
# creating an irregular hexagon that has an orange fill and a white outline
Irreg_Hexagon = shapes.Custom_Shape([100, 100], 0, True, gui.RGB(255,255,255), gui.RGB(255,165,0), [140, 160], [190,160], [60, 200], [60, 100], [80, 90])
gui.show([
Reg_Hexagon(),
Irreg_Hexagon(),])
Creates the 2 hexagons below.