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
CoordinateRangeyRange
CoordinateRange
CoordinateRect(CoordinateRangeMutable, CoordinateRangeMutable)
public CoordinateRect(CoordinateRangeMutable xRange, CoordinateRangeMutable yRange)
Parameters
xRange
CoordinateRangeMutableyRange
CoordinateRangeMutable
CoordinateRect(Coordinates, CoordinateSize)
public CoordinateRect(Coordinates point, CoordinateSize size)
Parameters
point
Coordinatessize
CoordinateSize
CoordinateRect(Coordinates, Coordinates)
public CoordinateRect(Coordinates pt1, Coordinates pt2)
Parameters
pt1
Coordinatespt2
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
Properties
Area
public double Area { get; }
Property Value
Bottom
public double Bottom { readonly get; set; }
Property Value
BottomLeft
public Coordinates BottomLeft { get; }
Property Value
BottomRight
public Coordinates BottomRight { get; }
Property Value
Center
public Coordinates Center { get; }
Property Value
Empty
public static CoordinateRect Empty { get; }
Property Value
HasArea
public bool HasArea { get; }
Property Value
Height
public double Height { get; }
Property Value
HorizontalCenter
public double HorizontalCenter { get; }
Property Value
IsInvertedX
public bool IsInvertedX { get; }
Property Value
IsInvertedY
public bool IsInvertedY { get; }
Property Value
Left
public double Left { readonly get; set; }
Property Value
Right
public double Right { readonly get; set; }
Property Value
Top
public double Top { readonly get; set; }
Property Value
TopLeft
public Coordinates TopLeft { get; }
Property Value
TopRight
public Coordinates TopRight { get; }
Property Value
VerticalCenter
public double VerticalCenter { get; }
Property Value
Width
public double Width { get; }
Property Value
XRange
public CoordinateRange XRange { get; }
Property Value
YRange
public CoordinateRange YRange { get; }
Property Value
Methods
Contains(Coordinates)
public bool Contains(Coordinates point)
Parameters
point
Coordinates
Returns
Contains(double, double)
public bool Contains(double x, double y)
Parameters
Returns
ContainsX(double)
public bool ContainsX(double x)
Parameters
x
double
Returns
ContainsY(double)
public bool ContainsY(double y)
Parameters
y
double
Returns
Equals(CoordinateRect)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(CoordinateRect other)
Parameters
other
CoordinateRectAn 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
objectThe 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
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
Returns
Operators
operator ==(CoordinateRect, CoordinateRect)
public static bool operator ==(CoordinateRect a, CoordinateRect b)
Parameters
Returns
operator !=(CoordinateRect, CoordinateRect)
public static bool operator !=(CoordinateRect a, CoordinateRect b)