Table of Contents

Struct CoordinateRect

Namespace
ScottPlot
Assembly
ScottPlot.dll

Describes a rectangle in 2D coordinate space.

public struct CoordinateRect : IEquatable<CoordinateRect>
Implements
Inherited Members
Extension Methods

Constructors

CoordinateRect(CoordinateRange, CoordinateRange)

public CoordinateRect(CoordinateRange xRange, CoordinateRange yRange)

Parameters

xRange CoordinateRange
yRange CoordinateRange

CoordinateRect(CoordinateRangeMutable, CoordinateRangeMutable)

public CoordinateRect(CoordinateRangeMutable xRange, CoordinateRangeMutable yRange)

Parameters

xRange CoordinateRangeMutable
yRange CoordinateRangeMutable

CoordinateRect(Coordinates, CoordinateSize)

public CoordinateRect(Coordinates point, CoordinateSize size)

Parameters

point Coordinates
size CoordinateSize

CoordinateRect(Coordinates, Coordinates)

public CoordinateRect(Coordinates pt1, Coordinates pt2)

Parameters

pt1 Coordinates
pt2 Coordinates

CoordinateRect(IAxes)

public CoordinateRect(IAxes axes)

Parameters

axes IAxes

CoordinateRect(double, double, double, double)

public CoordinateRect(double left, double right, double bottom, double top)

Parameters

left double
right double
bottom double
top double

Properties

Area

public double Area { get; }

Property Value

double

Bottom

public double Bottom { readonly get; set; }

Property Value

double

BottomLeft

public Coordinates BottomLeft { get; }

Property Value

Coordinates

BottomRight

public Coordinates BottomRight { get; }

Property Value

Coordinates

Center

public Coordinates Center { get; }

Property Value

Coordinates

Empty

public static CoordinateRect Empty { get; }

Property Value

CoordinateRect

HasArea

public bool HasArea { get; }

Property Value

bool

Height

public double Height { get; }

Property Value

double

HorizontalCenter

public double HorizontalCenter { get; }

Property Value

double

IsInvertedX

public bool IsInvertedX { get; }

Property Value

bool

IsInvertedY

public bool IsInvertedY { get; }

Property Value

bool

Left

public double Left { readonly get; set; }

Property Value

double

Right

public double Right { readonly get; set; }

Property Value

double

Top

public double Top { readonly get; set; }

Property Value

double

TopLeft

public Coordinates TopLeft { get; }

Property Value

Coordinates

TopRight

public Coordinates TopRight { get; }

Property Value

Coordinates

VerticalCenter

public double VerticalCenter { get; }

Property Value

double

Width

public double Width { get; }

Property Value

double

XRange

public CoordinateRange XRange { get; }

Property Value

CoordinateRange

YRange

public CoordinateRange YRange { get; }

Property Value

CoordinateRange

Methods

Contains(Coordinates)

public bool Contains(Coordinates point)

Parameters

point Coordinates

Returns

bool

Contains(double, double)

public bool Contains(double x, double y)

Parameters

x double
y double

Returns

bool

ContainsX(double)

public bool ContainsX(double x)

Parameters

x double

Returns

bool

ContainsY(double)

public bool ContainsY(double y)

Parameters

y double

Returns

bool

Equals(CoordinateRect)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CoordinateRect other)

Parameters

other CoordinateRect

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

Expanded(Coordinates)

public CoordinateRect Expanded(Coordinates point)

Parameters

point Coordinates

Returns

CoordinateRect

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

WithTranslation(Coordinates)

public CoordinateRect WithTranslation(Coordinates p)

Parameters

p Coordinates

Returns

CoordinateRect

Operators

operator ==(CoordinateRect, CoordinateRect)

public static bool operator ==(CoordinateRect a, CoordinateRect b)

Parameters

a CoordinateRect
b CoordinateRect

Returns

bool

operator !=(CoordinateRect, CoordinateRect)

public static bool operator !=(CoordinateRect a, CoordinateRect b)

Parameters

a CoordinateRect
b CoordinateRect

Returns

bool