diplomat.wx_gui.point_edit.WxDotShapeDrawer

class diplomat.wx_gui.point_edit.WxDotShapeDrawer(dc: wx.DC)[source]

Bases: DotShapeDrawer

__init__(dc: wx.DC)[source]

Methods

__init__(dc)

Attributes

SHAPE_TYPES

__contains__(shape: str) bool

Check if this shape drawer supports this shape.

Parameters:

shape – A string representing a shape type (“square”, “circle”, etc.)

Returns:

True if this shape drawer supports that shape, otherwise False.

__getitem__(shape: str) Callable[[float, float, float], None]

Get a drawer for the provided shape type.

Parameters:

shape – The shape to get a drawing function for, all drawers must support “circle”, “square”, “triangle”, and “star”.

Returns:

A function or callable which accepts 3 floats (x coordinate, y coordinate, shape radius), that draws a shape marker to the specified location when called.

__iter__()

Iterate over the names of the set of supported shapes.

Returns:

Iterable of strings, the supported shapes by their names (“square”, “circle”, etc.)

__len__()

Get the number of supported shapes.

Returns:

The number of supported shapes, and integer.