Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

Size

@Immutable inline class Size
kotlin.Any
   ↳ androidx.compose.ui.geometry.Size

Holds a 2D floating-point size.

You can think of this as an Offset from the origin.

Summary

Public methods
operator Float

operator Float

Size
copy(width: Float = this.width, height: Float = this.height)

Returns a copy of this Size instance optionally overriding the width or height parameter

operator Size
div(operand: Float)

Division operator.

Boolean

Whether this size encloses a non-zero area.

operator Size
times(operand: Float)

Multiplication operator.

String

Extension functions
From androidx.compose.ui.layout
operator Size
Size.div(scaleFactor: ScaleFactor)

Division operator with Size

operator Size
Size.times(scaleFactor: ScaleFactor)

Multiplication operator with Size.

From androidx.compose.ui.geometry
Size
Size.takeOrElse(block: () -> Size)

If this Size then this is returned, otherwise block is executed and its result is returned.

Rect

Convert a Size to a Rect.

Properties
Float

Float

The greater of the magnitudes of the width and the height.

Float

The lesser of the magnitudes of the width and the height.

Float

Companion properties
Size

A size whose width and height are unspecified.

Size

An empty size, one with a zero width and a zero height.

Extension properties
From androidx.compose.ui.geometry
Offset

Returns the Offset of the center of the rect from the point of 0,0 with this Size.

Boolean

false when this is Size.Unspecified.

Boolean

true when this is Size.Unspecified.

Public methods

component1

@Stable inline operator fun component1(): Float

component2

@Stable inline operator fun component2(): Float

copy

fun copy(
    width: Float = this.width,
    height: Float = this.height
): Size

Returns a copy of this Size instance optionally overriding the width or height parameter

div

@Stable operator fun div(operand: Float): Size

Division operator.

Returns a Size whose dimensions are the dimensions of the left-hand-side operand (a Size) divided by the scalar right-hand-side operand (a Float).

isEmpty

@Stable fun isEmpty(): Boolean

Whether this size encloses a non-zero area.

Negative areas are considered empty.

times

@Stable operator fun times(operand: Float): Size

Multiplication operator.

Returns a Size whose dimensions are the dimensions of the left-hand-side operand (a Size) multiplied by the scalar right-hand-side operand (a Float).

toString

fun toString(): String

Properties

height

@Stable val height: Float

maxDimension

@Stable val maxDimension: Float

The greater of the magnitudes of the width and the height.

minDimension

@Stable val minDimension: Float

The lesser of the magnitudes of the width