Artist

class compas.artists.Artist(item, **kwargs)[source]

Bases: object

Base class for all artists.

Class Attributes
  • AVAILABLE_CONTEXTS (list[str]) – The available visualization contexts.

  • CONTEXT (str | None) – The current visualization context is one of AVAILABLE_CONTEXTS.

  • ITEM_ARTIST (dict[str, dict[Type[Data], Type[Artist]]]) – Dictionary mapping data types to the corresponding artists types per visualization context.

Methods

build

Build an artist corresponding to the item type.

build_as

Build an artist with the given type.

clear

Clear all objects from the view.

draw

The main drawing method.

draw_collection

Drawing method for drawing an entire collection of objects.

redraw

Redraw the view.

register

Register an artist type to a data type.