LuciadCPillar C# 2023.1.04
|
A "POD" for a 2D rectangle. More...
Public Member Functions | |
Rectangle (Coordinate corner1, Coordinate corner2) | |
Creates a Rectangle with the given corners. More... | |
Rectangle (double x, double y, double width, double height) | |
Creates a Rectangle with the provided x, y, width, and height values. More... | |
Rectangle (Rectangle other) | |
override bool | Equals (object other) |
bool | Equals (Rectangle other) |
override int | GetHashCode () |
Returns the hash for this rectangle. More... | |
void | Grow (double margin) |
Grows this rectangle by the given margin. More... | |
bool | IsValid () |
Returns whether all fields are neither not-a-number nor infinite and the width and height are non-negative. More... | |
override string | ToString () |
Static Public Member Functions | |
static bool | operator!= (Rectangle lhs, Rectangle rhs) |
static bool | operator== (Rectangle lhs, Rectangle rhs) |
Properties | |
Coordinate | Center [get] |
double | Height [get] |
Coordinate | LowerLeftCorner [get] |
Coordinate | LowerRightCorner [get] |
Coordinate | UpperLeftCorner [get] |
Coordinate | UpperRightCorner [get] |
double | Width [get] |
double | X [get] |
double | Y [get] |
A "POD" for a 2D rectangle.
Not a geometry, to be used for communicating 2D cartesian rectangles.
|
inline |
Creates a Rectangle with the provided x, y, width, and height values.
x
the lower left corner's x-ordinate
y
the lower left corner's y-ordinate
width
the rectangle's width
height
the rectangle's height
|
inline |
Creates a Rectangle with the given corners.
The corners do not need to have any particular relation to each other. Only the x and y ordinates of the corners are considered.
corner1
one corner position
corner2
another corner position
|
inline |
|
inline |
|
inline |
|
inline |
Returns the hash for this rectangle.
the hash for this rectangle.
|
inline |
Grows this rectangle by the given margin.
The lower left corner is moved in the direction of negative x and y by margin. The upper right corner is moved in the direction of positive x and y by margin.
margin
a margin
|
inline |
Returns whether all fields are neither not-a-number nor infinite and the width and height are non-negative.
whether all fields are neither not-a-number nor infinite and the width and height are non-negative.
|
inline |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |
|
get |