Line

Sealed shape drawer that renders lines using the Shapes library. Contains the nested Line readonly struct for storing line parameters and the LineEndCap enum. The simplest and most commonly used drawer in the system.

Definition

Namespace: Paragon.Core.ShapesDrawer Assembly: Paragon.dll

public sealed class LineDrawer : ShapeDrawer<LineDrawer.Line>

Inheritance: ShapeDrawer<Line> → LineDrawer

Methods

Add

Enqueues a line for rendering this frame.

public void Add(Vector3 start, Vector3 end, Color color, float thickness = 1f, LineEndCap lineEndCap = LineEndCap.NONE)
Parameter
Type
Default
Description

start

Vector3

Line start position

end

Vector3

Line end position

color

Color

Line color

thickness

float

1f

Thickness in pixels

lineEndCap

LineEndCap

NONE

End cap style

Draw

Renders all queued lines. Applies lineGeometry and thicknessSpace, then iterates the queue calling Shapes.Draw.Line() for each entry.

Line Struct

Readonly struct holding all parameters for a single line draw call.

LineEndCap Enum

Paragon wrapper around the Shapes library's LineEndCap enum.

Examples

Direct Usage via ShapesDrawer

Debug Visualization

See Also

Last updated