Freigeben über


Rectangle Class

  • java.lang.Object
    • com.azure.ai.contentunderstanding.models.Rectangle

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:

x - The x-coordinate of the top-left corner.
y - The y-coordinate of the top-left corner.
width - The width of the rectangle.
height - The height of the rectangle.

Method Details

equals

public boolean equals(Object obj)

Overrides:

Rectangle.equals(Object obj)

Parameters:

obj

getHeight

public int getHeight()

Gets the height of the rectangle.

Returns:

The height.

getWidth

public int getWidth()

Gets the width of the rectangle.

Returns:

The width.

getX

public int getX()

Gets the x-coordinate of the top-left corner.

Returns:

The x-coordinate.

getY

public int getY()

Gets the y-coordinate of the top-left corner.

Returns:

The y-coordinate.

hashCode

public int hashCode()

Overrides:

Rectangle.hashCode()

toString

public String toString()

Overrides:

Rectangle.toString()

Applies to