LineArtist

class compas_plotters.artists.LineArtist(*args, **kwargs)[source]

Bases: PlotterArtist, PrimitiveArtist

Artist for COMPAS lines.

Parameters
  • line (compas.geometry.Line) – A COMPAS line.

  • draw_points (bool, optional) – If True, draw the start and end point of the line.

  • draw_as_segment (bool, optional) – If True, draw only the segment between start and end, instead of the infinite line.

  • linewidth (float, optional) – Width of the line.

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

  • color (tuple[float, float, float], optional) – Color of the line.

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

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

Attributes

line (compas.geometry.Line) – The line associated with the artist.

Methods

clip

Compute the clipping points of the line for the current view box.

draw

Draw the line associated with the artist.

redraw

Update the line 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.