LuciadCPillar C# 2024.0.08
|
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] |
The rectangle's height. More... | |
Coordinate | LowerLeftCorner [get] |
Coordinate | LowerRightCorner [get] |
Coordinate | UpperLeftCorner [get] |
Coordinate | UpperRightCorner [get] |
double | Width [get] |
The rectangle's width. More... | |
double | X [get] |
The lower left corner's x-ordinate. More... | |
double | Y [get] |
The lower left corner's y-ordinate. More... | |
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.
|
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.
|
inline |
|
get |
|
get |
The rectangle's height.
The rectangle's height.
|
get |
|
get |
|
get |
|
get |
|
get |
The rectangle's width.
The rectangle's width.
|
get |
The lower left corner's x-ordinate.
The lower left corner's x-ordinate.
|
get |
The lower left corner's y-ordinate.
The lower left corner's y-ordinate.