Source set: 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
}
Properties
width
Source set: Android
public val width: RemoteFloat
height
Source set: Android
public val height: RemoteFloat
minDimension
Source set: Android
public val minDimension: RemoteFloat
The lesser of the magnitudes of the width and the height.
center
Source set: Android
public val center: RemoteOffset
The offset to the center of this RemoteSize.
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
Source set: Android
public val Zero: RemoteSize
A RemoteSize with width and height set to 0.