Package io.scanbot.sdk.geometry
Class Rectangle
- java.lang.Object
-
- io.scanbot.sdk.geometry.Rectangle
-
public class Rectangle extends java.lang.ObjectRepresents a rectangle with integer coordinates in 2D space.
-
-
Constructor Summary
Constructors Constructor Description Rectangle(int x, int y, int width, int height)Constructs a rectangle with given coordinates and dimensions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHeight()Returns the height of the rectangle.intgetWidth()Returns the width of the rectangle.intgetX()Returns the x-coordinate of the top-left corner of the rectangle.intgetY()Returns the y-coordinate of the top-left corner of the rectangle.voidsetHeight(int height)Sets the height of the rectangle.voidsetWidth(int width)Sets the width of the rectangle.voidsetX(int x)Sets the x-coordinate of the top-left corner of the rectangle.voidsetY(int y)Sets the y-coordinate of the top-left corner of the rectangle.
-
-
-
Method Detail
-
getX
public int getX()
Returns the x-coordinate of the top-left corner of the rectangle.- Returns:
- x-coordinate
-
setX
public void setX(int x)
Sets the x-coordinate of the top-left corner of the rectangle.- Parameters:
x- x-coordinate
-
getY
public int getY()
Returns the y-coordinate of the top-left corner of the rectangle.- Returns:
- y-coordinate
-
setY
public void setY(int y)
Sets the y-coordinate of the top-left corner of the rectangle.- Parameters:
y- y-coordinate
-
getWidth
public int getWidth()
Returns the width of the rectangle.- Returns:
- width
-
setWidth
public void setWidth(int width)
Sets the width of the rectangle.- Parameters:
width- width
-
getHeight
public int getHeight()
Returns the height of the rectangle.- Returns:
- height
-
setHeight
public void setHeight(int height)
Sets the height of the rectangle.- Parameters:
height- height
-
-