Class

RemoteOffset

An immutable 2D floating-point offset that can be used to represent a point or a vector in a remote UI context.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public class RemoteOffset

An immutable 2D floating-point offset that can be used to represent a point or a vector in a remote UI context.

This class is similar to androidx.compose.ui.geometry.Offset, but uses RemoteFloat for its coordinates to support remote state synchronization.

Secondary Constructors

public constructor(x: RemoteFloat, y: RemoteFloat) {
    this.x = x
    this.y = y
}
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public constructor(x: Float, y: Float) : this(RemoteFloat(x), RemoteFloat(y))
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public constructor(x: Float, y: RemoteFloat) : this(RemoteFloat(x), y)
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public constructor(x: RemoteFloat, y: Float) : this(x, RemoteFloat(y))
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public constructor(offset: Offset) {
    this.x = offset.x.rf
    this.y = offset.y.rf
}

Functions

asOffset

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun asOffset(scope: RemoteStateScope): Offset

Companion Object

Properties

Android
public val Zero: RemoteOffset

A RemoteOffset with both x and y set to zero.