A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's upper-left point in the coordinate space, its width, and its height.
More...
Inherits BaseJavaClass.
|
None | __init__ (self, int x, int y, int width, int height) |
| Rectangle constructor. More...
|
|
bool | __eq__ (self, Optional[Rectangle] other) |
| Determines whether this instance and a specified object, which must also be a Unit object, have the same value. More...
|
|
int | __hash__ (self) |
| Returns the hash code for the current instance. More...
|
|
str | __str__ (self) |
|
int | getBottom (self) |
| Gets the y-coordinate that is the sum of the Y and Height property values of self Rectangle class. More...
|
|
int | getHeight (self) |
| Returns the height of the bounding Rectangle in double precision. More...
|
|
int | getLeft (self) |
| Gets the x-coordinate of the left edge of self Rectangle class. More...
|
|
int | getRight (self) |
| Gets the x-coordinate that is the sum of X and Width property values of self Rectangle class. More...
|
|
int | getTop (self) |
| Gets the y-coordinate of the top edge of self Rectangle class. More...
|
|
int | getWidth (self) |
| Returns the width of the bounding Rectangle in double precision. More...
|
|
int | getX (self) |
| Returns the X coordinate of the bounding Rectangle in double precision. More...
|
|
int | getY (self) |
| Returns the Y coordinate of the bounding Rectangle in double precision. More...
|
|
None | init (self) |
|
bool | intersectsWithInclusive (self, Rectangle rectangle) |
| Determines if self rectangle intersects with rect. More...
|
|
bool | isEmpty (self) |
|
None | __init__ (self, javaClass) |
|
def | getJavaClass (self) |
|
str | getJavaClassName (self) |
|
bool | isNull (self) |
|
None | printJavaClassName (self) |
|
None | setJavaClass (self, javaClass) |
|
A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's upper-left point in the coordinate space, its width, and its height.
◆ __init__()
None __init__ |
( |
|
self, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Rectangle constructor.
- Parameters
-
x | The x-coordinate of the upper-left corner of the rectangle. |
y | The y-coordinate of the upper-left corner of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
◆ __eq__()
bool __eq__ |
( |
|
self, |
|
|
Optional[Rectangle] |
other |
|
) |
| |
Determines whether this instance and a specified object, which must also be a Unit object, have the same value.
- Parameters
-
other | The Unit to compare to this instance. |
- Returns
- : True if other is a Unit and its value is the same as this instance, otherwise False. If other is None, the method returns false.
◆ __hash__()
Returns the hash code for the current instance.
- Returns
- A hash code for the current object.
◆ __str__()
◆ construct()
◆ fromLTRB()
Rectangle fromLTRB |
( |
int |
left, |
|
|
int |
top, |
|
|
int |
right, |
|
|
int |
bottom |
|
) |
| |
|
static |
FromLTRB Shared Method Produces a Rectangle class from left, top, right, and bottom coordinates.
◆ getBottom()
Gets the y-coordinate that is the sum of the Y and Height property values of self Rectangle class.
- Returns
- The y-coordinate that is the sum of Y and Height of self Rectangle.
◆ getHeight()
Returns the height of the bounding Rectangle in double precision.
- Returns
- the height of the bounding Rectangle.
◆ getLeft()
Gets the x-coordinate of the left edge of self Rectangle class.
- Returns
- The x-coordinate of the left edge of self Rectangle class.
◆ getRight()
Gets the x-coordinate that is the sum of X and Width property values of self Rectangle class.
- Returns
- The x-coordinate that is the sum of X and Width of self Rectangle.
◆ getTop()
Gets the y-coordinate of the top edge of self Rectangle class.
- Returns
- The y-coordinate of the top edge of self Rectangle class.
◆ getWidth()
Returns the width of the bounding Rectangle in double precision.
- Returns
- the width of the bounding Rectangle.
◆ getX()
Returns the X coordinate of the bounding Rectangle in double precision.
- Returns
- the X coordinate of the bounding Rectangle.
◆ getY()
Returns the Y coordinate of the bounding Rectangle in double precision.
- Returns
- the Y coordinate of the bounding Rectangle.
◆ init()
◆ intersect()
Intersect Shared Method Produces a new Rectangle by intersecting 2 existing Rectangles.
Returns None if there is no intersection.
◆ intersectsWithInclusive()
bool intersectsWithInclusive |
( |
|
self, |
|
|
Rectangle |
rectangle |
|
) |
| |
Determines if self rectangle intersects with rect.
- Parameters
-
- Returns
- {boolean
◆ isEmpty()
◆ javaClass
◆ javaClassName
string javaClassName = "java.awt.Rectangle" |
|
static |