Rectangle Class
- java.
lang. Object - com.
azure. ai. contentunderstanding. models. Rectangle
- com.
public final class Rectangle
Represents an axis-aligned rectangle with integer coordinates. Used by AudioVisualSource as the bounding box for spatial information (e.g., face detection).
Constructor Summary
| Constructor | Description |
|---|---|
| Rectangle(int x, int y, int width, int height) |
Creates a new Rectangle. |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| boolean | equals(Object obj) |
| int |
getHeight()
Gets the height of the rectangle. |
| int |
getWidth()
Gets the width of the rectangle. |
| int |
getX()
Gets the x-coordinate of the top-left corner. |
| int |
getY()
Gets the y-coordinate of the top-left corner. |
| int | hashCode() |
| String | toString() |
Methods inherited from java.lang.Object
Constructor Details
Rectangle
public Rectangle(int x, int y, int width, int height)
Creates a new Rectangle.
Parameters:
Method Details
equals
public boolean equals(Object obj)
Overrides:
Rectangle.equals(Object obj)Parameters:
getHeight
public int getHeight()
Gets the height of the rectangle.
Returns:
getWidth
public int getWidth()
Gets the width of the rectangle.
Returns:
getX
public int getX()
Gets the x-coordinate of the top-left corner.
Returns:
getY
public int getY()
Gets the y-coordinate of the top-left corner.
Returns:
hashCode
public int hashCode()
Overrides:
Rectangle.hashCode()toString
public String toString()
Overrides:
Rectangle.toString()