Rectangle
Leave feedback
On this page
Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct
public class Rectangle extends Struct<Rectangle>
A set of four integers that represent the location and size of a rectangle.
| Constructor | Description |
|---|---|
| Rectangle() |
| Method | Description |
|---|---|
| getEmpty() | Gets the empty rectangle. |
| getX() | Gets the x. |
| getY() | Gets the y. |
| getWidth() | Gets the width. |
| getHeight() | Gets the height. |
| getLeft() | Gets the x-coordinate of the left edge of the rectangle. |
| getTop() | Gets the y-coordinate that is the sum of the Y and Height property values of the rectangle. |
| getRight() | Gets the x-coordinate that is the sum of X and Width property values of the rectangle. |
| getBottom() | Gets the y-coordinate that is the sum of the Y and Height property values of the rectangle. |
| isEmpty() | Gets a value indicating whether this instance is empty. |
| toString() | Returns a System.String that represents this instance. |
| CloneTo(Rectangle that) | |
| Clone() | |
| clone() | |
| equals(Object obj) | |
| equals(Rectangle obj1, Rectangle obj2) |
public Rectangle()
public static Rectangle getEmpty()
Gets the empty rectangle.
Returns: Rectangle - The empty rectangle.
public final int getX()
Gets the x.
Returns: int - The x.
public final int getY()
Gets the y.
Returns: int - The y.
public final int getWidth()
Gets the width.
Returns: int - The width.
public final int getHeight()
Gets the height.
Returns: int - The height.
public final int getLeft()
Gets the x-coordinate of the left edge of the rectangle.
Returns: int - The x-coordinate of the left edge of the rectangle.
public final int getTop()
Gets the y-coordinate that is the sum of the Y and Height property values of the rectangle.
Returns: int - The y-coordinate that is the sum of the Y and Height property values of the rectangle.
public final int getRight()
Gets the x-coordinate that is the sum of X and Width property values of the rectangle.
Returns: int - The x-coordinate that is the sum of X and Width property values of the rectangle.
public final int getBottom()
Gets the y-coordinate that is the sum of the Y and Height property values of the rectangle.
Returns: int - The y-coordinate that is the sum of the Y and Height property values of the rectangle.
public final boolean isEmpty()
Gets a value indicating whether this instance is empty.
Returns: boolean - true if this instance is empty; otherwise, false .
public String toString()
Returns a System.String that represents this instance.
Returns: java.lang.String - A System.String that represents this instance.
public void CloneTo(Rectangle that)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| that | Rectangle |
public Rectangle Clone()
Returns: Rectangle
public Object clone()
Returns: java.lang.Object
public boolean equals(Object obj)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object |
Returns: boolean
public static boolean equals(Rectangle obj1, Rectangle obj2)
Parameters:
Returns: boolean
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.