Table of Contents

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

pt1 Coordinates
pt2 Coordinates

CoordinateLine(Coordinates, double)

public CoordinateLine(Coordinates point, double slope)

Parameters

point Coordinates
slope double

CoordinateLine(double, double, double)

public CoordinateLine(double x, double y, double slope)

Parameters

x double
y double
slope double

CoordinateLine(double, double, double, double)

public CoordinateLine(double x1, double y1, double x2, double y2)

Parameters

x1 double
y1 double
x2 double
y2 double

Fields

X1

public readonly double X1

Field Value

double

X2

public readonly double X2

Field Value

double

Y1

public readonly double Y1

Field Value

double

Y2

public readonly double Y2

Field Value

double

Properties

Center

public Coordinates Center { get; }

Property Value

Coordinates

End

public Coordinates End { get; }

Property Value

Coordinates

Length

public float Length { get; }

Property Value

float

Slope

public double Slope { get; }

Property Value

double

SlopeDegrees

public double SlopeDegrees { get; }

Property Value

double

SlopeRadians

public double SlopeRadians { get; }

Property Value

double

Start

public Coordinates Start { get; }

Property Value

Coordinates

XSpan

public double XSpan { get; }

Property Value

double

YIntercept

public double YIntercept { get; }

Property Value

double

YSpan

public double YSpan { get; }

Property Value

double

Methods

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

rect CoordinateRect

Returns

CoordinateLine

Reversed()

public CoordinateLine Reversed()

Returns

CoordinateLine

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

dX double
dY double

Returns

CoordinateLine

X(double)

Return the X position on the line at the given Y

public double X(double y = 0)

Parameters

y double

Returns

double

Y(double)

Return the Y position on the line at the given X

public double Y(double x = 0)

Parameters

x double

Returns

double