Polygon

class pywwt.Polygon(parent=None, **kwargs)[source]

Bases: pywwt.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(self, 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(self, 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).