std.geom.Rect - nitrologic/monkey2 GitHub Wiki
std::std.geom.Rect
Struct Rect
The Rect class provides support for manipulating rectangular regions.
Fields |
|
max |
Maximum rect coordinates. |
min |
Minimum rect coordinates. |
Properties |
|
Bottom |
The maximum X coordinate. |
BottomLeft |
The bottom-left of the rect. |
BottomRight |
The bottom-right of the rect. |
Center |
The center of the rect. (read only) |
Empty |
True if Right<=Left or Bottom<=Top. (read only) |
Height |
The height of the rect. (read only) |
Left |
The minimum X coordinate. |
Origin |
The top-left of the rect. |
Right |
The maximum X coordinate. |
Size |
The width and height of the rect. |
Top |
The minimum Y coordinate. |
TopLeft |
The top-left of the rect. |
TopRight |
The top-right of the rect. |
Width |
The width of the rect. (read only) |
X |
The minimum X coordinate. |
Y |
The minimum Y coordinate. |
Methods |
|
OpAnd |
Computes the intersection of the rect with another rect and returns the result. |
OpAndeq |
Intersects the rect with another rect. |
OpMul |
Multiples the rect by a vector and returns the result. |
OpMuleq |
Multiples the rect by a vector. |
OpAdd |
Adds another rect to the rect and returns the result. |
OpAddeq |
Adds another rect to the rect. |
OpSub |
Subtracts another rect from the rect and returns the result. |
OpSubeq |
Subtracts another rect from the rect. |
OpDiv |
Divides the rect by a vector and returns the result. |
OpDiveq |
Divides the rect by a vector. |
Centered |
Gets the rect centered within another rect. |
Contains |
Checks if the rect contains a vector or another rect. |
Intersects |
Checks if the rect intersects another rect. |
ToString |
Gets a string describing the rect. |
To |
Converts the rect to a rect of a different type |
[OpOr](/nitrologic/monkey2/wiki/Operator- |
) |
[OpOreq](/nitrologic/monkey2/wiki/Operator- |
=) |