PointKt

public final class PointKt


Summary

Public methods

static final int

Returns the x coordinate of this point.

static final float

Returns the x coordinate of this point.

static final int

Returns the y coordinate of this point.

static final float

Returns the y coordinate of this point.

static final @NonNull Point

Offsets this point by the negation of the specified point and returns the result as a new point.

static final @NonNull PointF

Offsets this point by the negation of the specified point and returns the result as a new point.

static final @NonNull Point
PointKt.minus(@NonNull Point receiver, int xy)

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

static final @NonNull PointF
PointKt.minus(@NonNull PointF receiver, float xy)

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

static final @NonNull Point

Offsets this point by the specified point and returns the result as a new point.

static final @NonNull PointF

Offsets this point by the specified point and returns the result as a new point.

static final @NonNull Point
PointKt.plus(@NonNull Point receiver, int xy)

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

static final @NonNull PointF
PointKt.plus(@NonNull PointF receiver, float xy)

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

static final @NonNull Point

Returns a Point representation of this point.

static final @NonNull PointF

Returns a PointF representation of this point.

static final @NonNull Point

Returns a new point representing the negation of this point.

static final @NonNull PointF

Returns a new point representing the negation of this point.

Public methods

PointKt.component1

@NonNull
public static final int PointKt.component1(@NonNull Point receiver)

Returns the x coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

val (x, y) = myPoint

PointKt.component1

@NonNull
public static final float PointKt.component1(@NonNull PointF receiver)

Returns the x coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

val (x, y) = myPoint

PointKt.component2

@NonNull
public static final int PointKt.component2(@NonNull Point receiver)

Returns the y coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

val (x, y) = myPoint

PointKt.component2

@NonNull
public static final float PointKt.component2(@NonNull PointF receiver)

Returns the y coordinate of this point.

This method allows to use destructuring declarations when working with points, for example:

val (x, y) = myPoint

PointKt.minus

@NonNull
public static final Point PointKt.minus(@NonNull Point receiver, @NonNull Point p)

Offsets this point by the negation of the specified point and returns the result as a new point.

PointKt.minus

@NonNull
public static final PointF PointKt.minus(@NonNull PointF receiver, @NonNull PointF p)

Offsets this point by the negation of the specified point and returns the result as a new point.

PointKt.minus

@NonNull
public static final Point PointKt.minus(@NonNull Point receiver, int xy)

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

PointKt.minus

@NonNull
public static final PointF PointKt.minus(@NonNull PointF receiver, float xy)

Offsets this point by the negation of the specified amount on both X and Y axis and returns the result as a new point.

PointKt.plus

@NonNull
public static final Point PointKt.plus(@NonNull Point receiver, @NonNull Point p)

Offsets this point by the specified point and returns the result as a new point.

PointKt.plus

@NonNull
public static final PointF PointKt.plus(@NonNull PointF receiver, @NonNull PointF p)

Offsets this point by the specified point and returns the result as a new point.

PointKt.plus

@NonNull
public static final Point PointKt.plus(@NonNull Point receiver, int xy)

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

PointKt.plus

@NonNull
public static final PointF PointKt.plus(@NonNull PointF receiver, float xy)

Offsets this point by the specified amount on both X and Y axis and returns the result as a new point.

PointKt.toPoint

@NonNull
public static final Point PointKt.toPoint(@NonNull PointF receiver)

Returns a Point representation of this point.

PointKt.toPointF

@NonNull
public static final PointF PointKt.toPointF(@NonNull Point receiver)

Returns a PointF representation of this point.

PointKt.unaryMinus

@NonNull
public static final Point PointKt.unaryMinus(@NonNull Point receiver)

Returns a new point representing the negation of this point.

PointKt.unaryMinus

@NonNull
public static final PointF PointKt.unaryMinus(@NonNull PointF receiver)

Returns a new point representing the negation of this point.