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
The starting point of the line.
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
The starting point of the line.
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
The starting point of the line.
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
The starting point of the line.
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
P1
Gets or sets the starting point of the line.
public System.Numerics.Vector2 P1 { get; set; }
Property Value
P2
Gets or sets the ending point of the line.
public System.Numerics.Vector2 P2 { get; set; }
Property Value
Thickness
Gets or sets the thickness of the line.
public float Thickness { get; set; }
Property Value
Remarks
Restricts the thickness to a minimum value of 1.