Android
public class RemoteSize
An immutable, 2D floating-point size with width and height represented as RemoteFloats.
This class is used in remote creation to represent dimensions that may be backed by remote state.
Secondary Constructors
public constructor(width: RemoteFloat, height: RemoteFloat) {
this.width = width
this.height = height
}
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public constructor(size: Size) {
this.width = size.width.rf
this.height = size.height.rf
}
Functions
offsetSize
public fun offsetSize(offset: RemoteOffset): RemoteSize
Returns a RemoteSize with the width and height decreased by the offset's x and y coordinates, respectively.
asSize
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public fun asSize(scope: RemoteStateScope): Size
Companion Object
Properties
Android
public val Zero: RemoteSize
A RemoteSize with width and height set to 0.