Polygon

class pywwt.annotation.Polygon(**kwargs: Any)[source]

Bases: Annotation

A polygon annotation.

Attributes Summary

fill

Whether or not the polygon should be filled (bool)

fill_color

Assigns fill color for the polygon (str or tuple)

line_color

Assigns line color for the polygon (str or tuple)

line_width

Assigns line width in pixels (Quantity)

shape

The name of the shape (str).

Methods Summary

add_point(coord)

Add one or more points to a polygon object.

Attributes Documentation

fill

Whether or not the polygon should be filled (bool)

fill_color

Assigns fill color for the polygon (str or tuple)

line_color

Assigns line color for the polygon (str or tuple)

line_width

Assigns line width in pixels (Quantity)

shape = 'polygon'

The name of the shape (str).

Methods Documentation

add_point(coord)[source]

Add one or more points to a polygon object.

If you want to fill the polygon, you should ensure that the vertices form a counter-clockwise polygon.

Parameters:
coordQuantity

The coordinates of the desired point(s).