etki.shp.Polygon

Polygon

A path that creates a shape.

class etki.shp.Polygon(vertices, *, fillcolor='black', bordercolor='black')
Argument
Purpose
Type
Note

vertices

list

fillcolor

Sets the color of the inside of the Poylgon

str

Optional

bordercolor

Sets the color of the border of the Polygon

str

Optional

Vertices

The vertices should be a listarrow-up-right, the contents of which should be tuplesarrow-up-right of points, e.g.

Polygon(
  [
    (1, 1),
    (2, 1),
    (2, 2),
    (1, 2),
    (1, 1)
  ]
)

The last point should close the shape, i.e. the last point should be the same as the first.

Last updated