public class PointF extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<PointF> |
CREATOR |
float |
x |
float |
y |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
PointF() |
PointF(float x,
float y) |
PointF(Point p) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Parcelable interface methods
|
boolean |
equals(float x,
float y)
Returns true if the point's coordinates equal (x,y)
|
float |
length()
Return the euclidian distance from (0,0) to the point
|
static float |
length(float x,
float y)
Returns the euclidian distance from (0,0) to (x,y)
|
void |
negate() |
void |
offset(float dx,
float dy) |
void |
readFromParcel(Parcel in)
Set the point's coordinates from the data stored in the specified
parcel.
|
void |
set(float x,
float y)
Set the point's x and y coordinates
|
void |
set(PointF p)
Set the point's x and y coordinates to the coordinates of p
|
void |
writeToParcel(Parcel out,
int flags)
Write this point to the specified parcel.
|
public float x
public float y
public static final Parcelable.Creator<PointF> CREATOR
public PointF()
public PointF(float x, float y)
public PointF(Point p)
public final void set(float x, float y)
public final void set(PointF p)
public final void negate()
public final void offset(float dx, float dy)
public final boolean equals(float x, float y)
public final float length()
public static float length(float x, float y)
public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel out, int flags)
writeToParcel
in interface Parcelable
out
- The parcel to write the point's coordinates intoflags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void readFromParcel(Parcel in)
in
- The parcel to read the point's coordinates from