Artist

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

Bases: object

Base class for all artists.

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

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

  • ITEM_ARTIST (dict[str, dict[Type[compas.data.Data], Type[compas.artists.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.