Point
open class Point : Parcelable
kotlin.Any | |
↳ | android.graphics.Point |
Point holds two integer coordinates
Summary
Inherited constants | |
---|---|
Public constructors | |
---|---|
Point() |
|
Public methods | |
---|---|
open Int |
Parcelable interface methods |
Boolean |
Returns true if the point's coordinates equal (x,y) |
open Boolean | |
open Int |
hashCode() |
Unit |
negate() Negate the point's coordinates |
Unit |
Offset the point's coordinates by dx, dy |
open Unit |
readFromParcel(in: Parcel) Set the point's coordinates from the data stored in the specified parcel. |
open Unit |
Set the point's x and y coordinates |
open String |
toString() |
open Unit |
writeToParcel(out: Parcel, flags: Int) Write this point to the specified parcel. |
Properties | |
---|---|
static Parcelable.Creator<Point!> | |
Int | |
Int |
Public constructors
Public methods
describeContents
open fun describeContents(): Int
Parcelable interface methods
Return | |
---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR |
equals
fun equals(
x: Int,
y: Int
): Boolean
Returns true if the point's coordinates equal (x,y)
equals
open fun equals(other: Any?): Boolean
Parameters | |
---|---|
obj |
the reference object with which to compare. |
Return | |
---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
hashCode
open fun hashCode(): Int
Return | |
---|---|
Int |
a hash code value for this object. |
offset
fun offset(
dx: Int,
dy: Int
): Unit
Offset the point's coordinates by dx, dy
readFromParcel
open fun readFromParcel(in: Parcel): Unit
Set the point's coordinates from the data stored in the specified parcel. To write a point to a parcel, call writeToParcel().
Parameters | |
---|---|
in |
Parcel: The parcel to read the point's coordinates from This value cannot be null . |
toString
open fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
out: Parcel,
flags: Int
): Unit
Write this point to the specified parcel. To restore a point from a parcel, use readFromParcel()
Parameters | |
---|---|
dest |
The Parcel in which the object should be written. This value cannot be null . |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE . Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
out |
Parcel: The parcel to write the point's coordinates into |