Sequenceablepublic class CvPoint extends Object implements Sequenceable
The location information includes the horizontal and vertical coordinates.
Sequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
int |
x |
Indicates the horizontal coordinate of a coordinate point.
|
int |
y |
Indicates the vertical coordinate of a coordinate point.
|
| 构造器 | 说明 |
|---|---|
CvPoint() |
Default constructor used to create a
CvPoint instance. |
CvPoint(int x,
int y) |
A constructor used to create a
CvPoint instance using the input
parameters x and y. |
CvPoint(CvPoint src) |
A constructor used to create a
CvPoint instance using the input
parameter src. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
boolean |
equals(int inputX,
int inputY) |
Checks whether an input instance is equal to the current instance.
|
boolean |
equals(Object object) |
Checks whether an input instance is equal to the current instance.
|
int |
hashCode() |
Calculates the hash code of the object based on the horizontal and vertical coordinates.
|
boolean |
marshalling(Parcel out) |
Marshals the horizontal and vertical coordinates of the current instance.
|
void |
negate() |
Obtains the opposite number of the horizontal and vertical coordinates.
|
void |
offset(int dx,
int dy) |
Obtains the coordinates after the horizontal and vertical coordinates are offset.
|
void |
set(int inputX,
int inputY) |
Sets the horizontal and vertical coordinates of a coordinate point.
|
String |
toString() |
Combines the horizontal and vertical coordinates of the current instance to a character string.
|
boolean |
unmarshalling(Parcel in) |
Unmarshals an object to obtain its horizontal and vertical coordinates.
|
hasFileDescriptorpublic int x
public int y
public CvPoint()
CvPoint instance.public CvPoint(int x,
int y)
CvPoint instance using the input
parameters x and y.x - Indicates the horizontal coordinate of a coordinate point.y - Indicates the vertical coordinate of a coordinate point.public CvPoint(CvPoint src)
CvPoint instance using the input
parameter src.src - Indicates the coordinates of a CvPoint instance.public void set(int inputX,
int inputY)
inputX - Indicates the horizontal coordinate of a coordinate point.inputY - Indicates the vertical coordinate of a coordinate point.public final void negate()
public final void offset(int dx,
int dy)
dx - Indicates the offset of the horizontal coordinate.dy - Indicates the offset of the vertical coordinate.public final boolean equals(int inputX,
int inputY)
This method passes the horizontal and vertical coordinate points and checks whether their combination is equal to that of an existing instance in the class.
inputX - Indicates the horizontal coordinate of a coordinate point.inputY - Indicates the vertical coordinate of a coordinate point.true if the input instance is equal to the current instance;
returns false otherwise.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 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.