Added in API level 1

Point


open class Point : Parcelable
kotlin.Any
   ↳ android.graphics.Point

Point holds two integer coordinates

Summary

Inherited constants
Public constructors

Point(x: Int, y: Int)

Point(src: Point)

Public methods
open Int

Parcelable interface methods

Boolean
equals(x: Int, y: Int)

Returns true if the point's coordinates equal (x,y)

open Boolean
equals(other: Any?)

open Int

Unit

Negate the point's coordinates

Unit
offset(dx: Int, dy: Int)

Offset the point's coordinates by dx, dy

open Unit

Set the point's coordinates from the data stored in the specified parcel.

open Unit
set(x: Int, y: Int)

Set the point's x and y coordinates

open String

open Unit
writeToParcel(out: Parcel, flags: Int)

Write this point to the specified parcel.

Properties
static Parcelable.Creator<Point!>

Int

Int

Public constructors

Point

Added in API level 1
Point()

Point

Added in API level 1
Point(
    x: Int,
    y: Int)

Point

Added in API level 1
Point(src: Point)
Parameters
src Point: This value cannot be null.

Public methods

describeContents

Added in API level 13
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

Added in API level 1
fun equals(
    x: Int,
    y: Int
): Boolean

Returns true if the point's coordinates equal (x,y)

equals

Added in API level 1
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

Added in API level 1
open fun hashCode(): Int
Return
Int a hash code value for this object.

negate

Added in API level 1
fun negate(): Unit

Negate the point's coordinates

offset

Added in API level 1
fun offset(
    dx: Int,
    dy: Int
): Unit

Offset the point's coordinates by dx, dy

readFromParcel

Added in API level 13
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.

set

Added in API level 1
open fun set(
    x: Int,
    y: Int
): Unit

Set the point's x and y coordinates

toString

Added in API level 1
open fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 13
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

Properties

CREATOR

Added in API level 13
static val CREATOR: Parcelable.Creator<Point!>

x

Added in API level 1
var x: Int

y

Added in API level 1
var y: Int