Struct CoordinateLine
- Namespace
- ScottPlot
- Assembly
- ScottPlot.dll
Represents a straight line in coordinate space
public readonly struct CoordinateLine
- Inherited Members
- Extension Methods
Constructors
CoordinateLine(Coordinates, Coordinates)
public CoordinateLine(Coordinates pt1, Coordinates pt2)
Parameters
pt1Coordinatespt2Coordinates
CoordinateLine(Coordinates, double)
public CoordinateLine(Coordinates point, double slope)
Parameters
pointCoordinatesslopedouble
CoordinateLine(double, double, double)
public CoordinateLine(double x, double y, double slope)
Parameters
CoordinateLine(double, double, double, double)
public CoordinateLine(double x1, double y1, double x2, double y2)
Parameters
Fields
X1
public readonly double X1
Field Value
X2
public readonly double X2
Field Value
Y1
public readonly double Y1
Field Value
Y2
public readonly double Y2
Field Value
Properties
Center
public Coordinates Center { get; }
Property Value
End
public Coordinates End { get; }
Property Value
Length
public float Length { get; }
Property Value
Slope
public double Slope { get; }
Property Value
SlopeDegrees
public double SlopeDegrees { get; }
Property Value
SlopeRadians
public double SlopeRadians { get; }
Property Value
Start
public Coordinates Start { get; }
Property Value
XMax
public double XMax { get; }
Property Value
XMin
public double XMin { get; }
Property Value
XSpan
public double XSpan { get; }
Property Value
YIntercept
public double YIntercept { get; }
Property Value
YMax
public double YMax { get; }
Property Value
YMin
public double YMin { get; }
Property Value
YSpan
public double YSpan { get; }
Property Value
Methods
BoundingBox()
public CoordinateRect BoundingBox()
Returns
ExtendTo(CoordinateRect)
Adjust the line to fit within the boundaries of the given rectangle. The slope and Y intercept will not be changed.
public CoordinateLine ExtendTo(CoordinateRect rect)
Parameters
rectCoordinateRect
Returns
Reversed()
public CoordinateLine Reversed()
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
WithDelta(double, double)
public CoordinateLine WithDelta(double dX, double dY)
Parameters
Returns
X(double)
Return the X position on the line at the given Y
public double X(double y = 0)
Parameters
ydouble
Returns
Y(double)
Return the Y position on the line at the given X
public double Y(double x = 0)
Parameters
xdouble