public class BoundingBox extends Object
| 构造器 | 说明 |
|---|---|
BoundingBox() |
Default constructor used to create a
BoundingBox instance. |
BoundingBox(int left,
int top,
int width,
int height) |
A constructor used to create a
BoundingBox instance using the input parameters
left, top, width, and height. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
int |
getHeight() |
Obtains the height of the bounding box.
|
int |
getLeft() |
Obtains the horizontal coordinate of the upper left corner of the bounding box.
|
int |
getTop() |
Obtains the vertical coordinate of the upper left corner of the bounding box.
|
int |
getWidth() |
Obtains the width of the bounding box.
|
void |
setHeight(int height) |
Sets the height of the bounding box.
|
void |
setLeft(int left) |
Sets the horizontal coordinate of the upper left corner of the bounding box.
|
void |
setTop(int top) |
Sets the vertical coordinate of the upper left corner of the bounding box.
|
void |
setWidth(int width) |
Sets the width of the bounding box.
|
public BoundingBox()
BoundingBox instance.public BoundingBox(int left,
int top,
int width,
int height)
BoundingBox instance using the input parameters
left, top, width, and height.left - Indicates the horizontal coordinate of the upper left corner of the bounding box, in pixels.top - Indicates the vertical coordinate of the upper left corner of the bounding box, in pixels.width - Indicates the width of the bounding box.height - Indicates the height of the bounding box.public int getLeft()
public void setLeft(int left)
left - Indicates the horizontal coordinate of the upper left corner of the bounding box, in pixels.public int getTop()
public void setTop(int top)
top - Indicates the vertical coordinate of the upper left corner of the bounding box, in pixels.public int getWidth()
public void setWidth(int width)
width - Indicates the bounding box width, in pixels.public int getHeight()
public void setHeight(int height)
height - Indicates the bounding box height, in pixels.