PolygonArtist

class compas_plotters.artists.PolygonArtist(item, **kwargs)[source]

Bases: PlotterArtist, PrimitiveArtist

Artist for COMPAS polygons.

Parameters
  • polygon (Polygon) – A COMPAS polygon.

  • linewidth (float, optional) – Width of the polygon edge lines.

  • linestyle ({‘solid’, ‘dotted’, ‘dashed’, ‘dashdot’}, optional) – Style of the line.

  • facecolor (tuple[float, float, float], optional) – Color of the interior face of the polygon.

  • edgecolor (tuple[float, float, float], optional) – Color of the boundary of the polygon.

  • zorder (int, optional) – Stacking order of the polygon on the canvas.

  • **kwargs (dict, optional) – Additional keyword arguments. See PlotterArtist and PrimitiveArtist for more info.

Attributes

polygon (Polygon) – The polygon associated with the artist.

Methods

draw

Draw the polygon.

redraw

Update the polygon using the current geometry and visualization settings.

Inherited 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_collection

Drawing method for drawing an entire collection of objects.

register

Register an artist type to a data type.

update_data

Update the data limits of the plotting axes using the visualization data.

viewbox

Compute the bounds of the current view.