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.
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__()
def __init__ |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
width, |
|
|
|
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. |
◆ construct()
◆ equals()
◆ fromLTRB()
def fromLTRB |
( |
|
left, |
|
|
|
top, |
|
|
|
right, |
|
|
|
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()
def intersectsWithInclusive |
( |
|
self, |
|
|
|
rectangle |
|
) |
| |
Determines if self rectangle intersects with rect.
- Parameters
-
- Returns
- {boolean
◆ isEmpty()
◆ toString()
◆ javaClass
◆ javaClassName
string javaClassName = "java.awt.Rectangle" |
|
static |