Sequenceablepublic class CvRect extends Object implements Sequenceable
The rectangle area has four coordinates (in pixels): vertical coordinate of the upper boundary, horizontal coordinate of the left boundary, vertical coordinate of the lower boundary, and horizontal coordinate of the right boundary.
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
bottom |
Indicates the vertical coordinate of the lower boundary of a rectangle.
|
int |
left |
Indicates the horizontal coordinate of the left boundary of a rectangle.
|
int |
right |
Indicates the horizontal coordinate of the right boundary of a rectangle.
|
int |
top |
Indicates the vertical coordinate of the upper boundary of a rectangle.
|
| 构造器 | 说明 |
|---|---|
CvRect() |
Default constructor used to create a
CvRect instance. |
CvRect(int inputTop,
int inputLeft,
int inputBottom,
int inputRight) |
A constructor used to create a
CvRect instance using the input parameters inputTop,
inputLeft, inputBottom, and inputRight. |
CvRect(CvRect inputCvRect) |
A constructor used to create a
CvRect instance using the input parameter
inputCvRect. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(Object object) |
Checks whether an input instance is equal to the current instance.
|
int |
hashCode() |
Calculates the hash code of the current instance based on its four coordinates.
|
int |
height() |
Obtains the height of the rectangle, in pixels.
|
boolean |
isEmpty() |
Checks whether the current instance is valid.
|
boolean |
marshalling(Parcel out) |
Marshals the horizontal and vertical coordinates of the current instance.
|
void |
set(int inputTop,
int inputLeft,
int inputBottom,
int inputRight) |
Sets the four coordinates of a rectangle.
|
void |
set(CvRect src) |
Sets the four coordinates of a rectangle.
|
String |
toString() |
Combines the four coordinates in a character string.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals an object to obtain its horizontal and vertical coordinates.
|
int |
width() |
Obtains the width of the rectangle, in pixels.
|
hasFileDescriptorpublic int bottom
public int left
public int right
public int top
public CvRect()
CvRect instance.public CvRect(int inputTop,
int inputLeft,
int inputBottom,
int inputRight)
CvRect instance using the input parameters inputTop,
inputLeft, inputBottom, and inputRight.inputTop - Indicates the vertical coordinate of the upper boundary of a rectangle.inputLeft - Indicates the horizontal coordinate of the left boundary of a rectangle.inputBottom - Indicates the vertical coordinate of the lower boundary of a rectangle.inputRight - Indicates the horizontal coordinate of the right boundary of a rectangle.public CvRect(CvRect inputCvRect)
CvRect instance using the input parameter
inputCvRect.inputCvRect - Indicates an existing CvRect instance.public boolean equals(Object object)
equals 在类中 Objectobject - Indicates the input instance.true if the input instance is equal to the current instance;
returns false otherwise.Object.hashCode(),
HashMappublic int hashCode()
hashCode 在类中 ObjectObject.equals(java.lang.Object),
System.identityHashCode(java.lang.Object)public String toString()
public boolean isEmpty()
true if the current instance is valid; returns false otherwise.public int width()
public int height()
public void set(int inputTop,
int inputLeft,
int inputBottom,
int inputRight)
inputTop - Indicates the vertical coordinate of the upper boundary of the rectangle.inputLeft - Indicates the horizontal coordinate of the left boundary of the rectangle.inputBottom - Indicates the vertical coordinate of the lower boundary of the rectangle.inputRight - Indicates the horizontal coordinate of the right boundary of the rectangle.public void set(CvRect src)
src - Indicates the coordinates of a CvRect instance.public boolean marshalling(Parcel out)
marshalling 在接口中 Sequenceableout - Indicates the marshalled object to which the horizontal and
vertical coordinates of the object are written.true if the marshalling is complete; returns false otherwise.public boolean unmarshalling(Parcel in)
unmarshalling 在接口中 Sequenceablein - Indicates a marshalled object used to read the horizontal and vertical coordinates of the object.true if the unmarshalling is complete; returns false otherwise.