Skip to main content
Version: 1.0.0-preview.36

Velaptor.Graphics.Line

Velaptor

Velaptor.Graphics

Line Struct

Represents a single line segment.

public struct Line

Constructors

Line(Vector2, Vector2, float) Constructor

Initializes a new instance of the Line struct.

public Line(System.Numerics.Vector2 p1, System.Numerics.Vector2 p2, float thickness);

Parameters

p1 System.Numerics.Vector2

The starting point of the line.

p2 System.Numerics.Vector2

The ending point of the line.

thickness System.Single

The thickness of the line.

Line(Vector2, Vector2, Color, float) Constructor

Initializes a new instance of the Line struct.

public Line(System.Numerics.Vector2 p1, System.Numerics.Vector2 p2, System.Drawing.Color color, float thickness);

Parameters

p1 System.Numerics.Vector2

The starting point of the line.

p2 System.Numerics.Vector2

The ending point of the line.

color System.Drawing.Color

The color of the line.

thickness System.Single

The thickness of the line.

Line(Vector2, Vector2, Color) Constructor

Initializes a new instance of the Line struct.

public Line(System.Numerics.Vector2 p1, System.Numerics.Vector2 p2, System.Drawing.Color color);

Parameters

p1 System.Numerics.Vector2

The starting point of the line.

p2 System.Numerics.Vector2

The ending point of the line.

color System.Drawing.Color

The color of the line.

Line(Vector2, Vector2) Constructor

Initializes a new instance of the Line struct.

public Line(System.Numerics.Vector2 p1, System.Numerics.Vector2 p2);

Parameters

p1 System.Numerics.Vector2

The starting point of the line.

p2 System.Numerics.Vector2

The ending point of the line.

Properties

Color

Gets or sets the color of the line.

public System.Drawing.Color Color { get; set; }

Property Value

System.Drawing.Color

P1

Gets or sets the starting point of the line.

public System.Numerics.Vector2 P1 { get; set; }

Property Value

System.Numerics.Vector2

P2

Gets or sets the ending point of the line.

public System.Numerics.Vector2 P2 { get; set; }

Property Value

System.Numerics.Vector2

Thickness

Gets or sets the thickness of the line.

public float Thickness { get; set; }

Property Value

System.Single

Remarks

Restricts the thickness to a minimum value of 1.