PointF
open class PointF : Parcelable
| kotlin.Any | |
| ↳ | android.graphics.PointF | 
PointF holds two float coordinates
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
            PointF() | 
        |
| 
            
             Create a new PointF initialized with the values in the specified PointF (which is left unmodified).  | 
        |
| Public methods | |
|---|---|
| open Int | 
            
             Parcelable interface methods  | 
        
| Boolean | 
            
             Returns true if the point's coordinates equal (x,y)  | 
        
| open Boolean | |
| open Int | 
            hashCode() | 
        
| Float | 
            length()Return the euclidian distance from (0,0) to the point  | 
        
| open static Float | 
            
             Returns the euclidian distance from (0,0) to (x,y)  | 
        
| Unit | 
            negate() | 
        
| Unit | |
| open Unit | 
            readFromParcel(in: Parcel)Set the point's coordinates from the data stored in the specified parcel.  | 
        
| Unit | 
            
             Set the point's x and y coordinates to the coordinates of p  | 
        
| 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<PointF!> | |
| Float | |
| Float | |
Public constructors
PointF
PointF(p: PointF)
Create a new PointF initialized with the values in the specified PointF (which is left unmodified).
| Parameters | |
|---|---|
p | 
            PointF: The point whose values are copied into the new point. This value cannot be null. | 
          
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: Float,
y: Float
): 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. | 
length
fun length(): Float
Return the euclidian distance from (0,0) to the point
length
open static fun length(
x: Float,
y: Float
): Float
Returns the euclidian distance from (0,0) to (x,y)
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. | 
          
set
fun set(p: PointF): Unit
Set the point's x and y coordinates to the coordinates of p
| Parameters | |
|---|---|
p | 
            PointF: 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 |