androidx.xr.compose.unit
Classes
DpVolumeOffset |
Represents the offset of an object in 3D space. |
DpVolumeSize |
Represents the size of a volume in density-independent pixels ( |
IntVolumeOffset |
Represents the offset of an object in 3D space. |
IntVolumeSize |
Represents the size of a volume in pixels. |
Meter |
This class is deprecated. Use LocalSession.current?.scene?.virtualPixelDensity instead. |
VolumeConstraints |
Defines constraints for a 3D volume, specifying minimum and maximum values for width, height, and depth. |
Extension functions summary
VolumeConstraints |
VolumeConstraints.constrain(otherConstraints: VolumeConstraints)Constrains the dimensions of this |
Int |
VolumeConstraints.constrainDepth(depth: Int)Constrains a given depth value to fit within the bounds of this |
Int |
VolumeConstraints.constrainHeight(height: Int)Constrains a given height value to fit within the bounds of this |
Int |
VolumeConstraints.constrainWidth(width: Int)Constrains a given |
inline operator Meter |
This function is deprecated. Meter class is deprecated. |
inline operator Meter |
This function is deprecated. Meter class is deprecated. |
inline operator Meter |
This function is deprecated. Meter class is deprecated. |
VolumeConstraints |
Creates a new |
inline operator Meter |
This function is deprecated. Meter class is deprecated. |
inline operator Meter |
This function is deprecated. Meter class is deprecated. |
inline operator Meter |
This function is deprecated. Meter class is deprecated. |
inline Meter |
This function is deprecated. Use LocalSession.current?.scene?.virtualPixelDensity instead. |
Extension functions
VolumeConstraints.constrain
fun VolumeConstraints.constrain(otherConstraints: VolumeConstraints): VolumeConstraints
Constrains the dimensions of this VolumeConstraints object to fit within the bounds of the other VolumeConstraints object.
| Parameters | |
|---|---|
otherConstraints: VolumeConstraints |
the other |
| Returns | |
|---|---|
VolumeConstraints |
a new |
VolumeConstraints.constrainDepth
fun VolumeConstraints.constrainDepth(depth: Int): Int
Constrains a given depth value to fit within the bounds of this VolumeConstraints object.
| Parameters | |
|---|---|
depth: Int |
the depth value to constrain. |
| Returns | |
|---|---|
Int |
the constrained depth value, ensuring it's within the minimum and maximum depth bounds. |
VolumeConstraints.constrainHeight
fun VolumeConstraints.constrainHeight(height: Int): Int
Constrains a given height value to fit within the bounds of this VolumeConstraints object.
| Parameters | |
|---|---|
height: Int |
the height value to constrain. |
| Returns | |
|---|---|
Int |
the constrained height value, ensuring it's within the minimum and maximum height bounds. |
VolumeConstraints.constrainWidth
fun VolumeConstraints.constrainWidth(width: Int): Int
Constrains a given width value to fit within the bounds of this VolumeConstraints object.
| Parameters | |
|---|---|
width: Int |
the width value to constrain. |
| Returns | |
|---|---|
Int |
the constrained width value, ensuring it's within the minimum and maximum width bounds. |
Int.div
inline operator fun Int.div(other: Meter): Meter
Float.div
inline operator fun Float.div(other: Meter): Meter
Double.div
inline operator fun Double.div(other: Meter): Meter
VolumeConstraints.offset
fun VolumeConstraints.offset(
horizontal: Int = 0,
vertical: Int = 0,
depth: Int = 0,
resetMins: Boolean = false
): VolumeConstraints
Creates a new VolumeConstraints object by offsetting the minimum and maximum values of this one.
| Parameters | |
|---|---|
horizontal: Int = 0 |
the horizontal offset to apply. |
vertical: Int = 0 |
the vertical offset to apply. |
depth: Int = 0 |
the depth offset to apply. |
resetMins: Boolean = false |
if true, the minimum values in the new constraints will be set to 0, otherwise. they will be offset. |
| Returns | |
|---|---|
VolumeConstraints |
a new |
Int.times
inline operator fun Int.times(other: Meter): Meter
Float.times
inline operator fun Float.times(other: Meter): Meter
Double.times
inline operator fun Double.times(other: Meter): Meter
Dp.toMeter
inline fun Dp.toMeter(): Meter
Handles unspecified and infinite Dp values gracefully.
| Returns | |
|---|---|
Meter |
the equivalent value in meters, or |