Placeable
A Placeable corresponds to a child layout that can be positioned by its parent layout. Most Placeables are the result of a Measurable.measure call.
A Placeable should never be stored between measure calls.
Summary
Nested types |
|---|
@PlacementScopeMarkerReceiver scope that permits explicit placement of a |
Public constructors |
|
|---|---|
|
Cmn
|
Protected functions |
||
|---|---|---|
abstract Unit |
placeAt(position: IntOffset, zIndex: Float, layerBlock: (GraphicsLayerScope.() -> Unit)?)Place a |
Cmn
|
open Unit |
placeAt(position: IntOffset, zIndex: Float, layer: GraphicsLayer)Place a |
Cmn
|
Public properties |
||
|---|---|---|
Int |
The height, in pixels, of the measured layout, as seen by the parent. |
Cmn
|
open Int |
The measured height of the layout. |
Cmn
|
open Int |
The measured width of the layout. |
Cmn
|
Int |
The width, in pixels, of the measured layout, as seen by the parent. |
Cmn
|
Protected properties |
||
|---|---|---|
IntOffset |
The offset to be added to an apparent position assigned to this |
Cmn
|
IntSize |
The measured size of this Placeable. |
Cmn
|
Constraints |
The constraints used for the measurement made to obtain this |
Cmn
|
Inherited functions |
|||
|---|---|---|---|
|
Inherited properties |
|||
|---|---|---|---|
|
Public constructors
Protected functions
placeAt
protected abstract fun placeAt(position: IntOffset, zIndex: Float, layerBlock: (GraphicsLayerScope.() -> Unit)?): Unit
Place a Placeable at position in its parent's coordinate system.
| Parameters | |
|---|---|
position: IntOffset |
position in the parent's coordinate system. |
zIndex: Float |
controls the drawing order for the |
layerBlock: (GraphicsLayerScope.() -> Unit)? |
when non-null this |
placeAt
protected open fun placeAt(position: IntOffset, zIndex: Float, layer: GraphicsLayer): Unit
Place a Placeable at position in its parent's coordinate system.
| Parameters | |
|---|---|
position: IntOffset |
position in the parent's coordinate system. |
zIndex: Float |
controls the drawing order for the |
layer: GraphicsLayer |
|
Public properties
height
val height: Int
The height, in pixels, of the measured layout, as seen by the parent. This will usually coincide with the measured height of the layout (aka the height value passed into MeasureScope.layout), but can be different if the layout does not respect its incoming constraints: in these cases the height will be coerced inside the min and max height constraints - to access the actual height that the layout measured itself to, use measuredHeight.
measuredHeight
open val measuredHeight: Int
The measured height of the layout. This might not respect the measurement constraints.
measuredWidth
open val measuredWidth: Int
The measured width of the layout. This might not respect the measurement constraints.
width
val width: Int
The width, in pixels, of the measured layout, as seen by the parent. This will usually coincide with the measured width of the layout (aka the width value passed into MeasureScope.layout), but can be different if the layout does not respect its incoming constraints: in these cases the width will be coerced inside the min and max width constraints - to access the actual width that the layout measured itself to, use measuredWidth.
Protected properties
apparentToRealOffset
protected val apparentToRealOffset: IntOffset
The offset to be added to an apparent position assigned to this Placeable to make it real. The real layout will be centered on the space assigned by the parent, which computed the child's position only seeing its apparent size.
measuredSize
protected var measuredSize: IntSize
The measured size of this Placeable. This might not respect measurementConstraints.
measurementConstraints
protected var measurementConstraints: Constraints
The constraints used for the measurement made to obtain this Placeable.