pub struct InlineNode {
pub node_id: NodeId,
pub origin: Point,
pub size: Size,
pub motion_context_animated: bool,
pub change: LayerChange,
pub content: Vec<RenderNode>,
/* private fields */
}Expand description
A layout node drawn into its parent’s layer instead of a layer of its own, as Compose draws a node without a graphics layer into the display list of the layer above it: a leaf with no layer properties, pointer handling or window origins to publish. The scene matches it with its node as it matches a child layer, and a renderer places its content as it would place a child layer that only moves.
Fields§
§node_id: NodeIdLayout node drawn here.
origin: PointThe node’s top left in its parent’s layer: its placement and the parent’s content offset, where a layer of its own would lie.
size: SizeThe node’s size: its rect in its own space starts at the origin.
motion_context_animated: boolWhether the node lies in a motion context such as an animated scroll, where a renderer must not snap its content rigidly to the pixel grid.
change: LayerChangeThe number the node took when it last changed.
content: Vec<RenderNode>The node’s draws and text in draw order, in its own space: primitives and draw runs only.
Implementations§
Source§impl InlineNode
impl InlineNode
Sourcepub fn transform_to_parent(&self) -> ProjectiveTransform
pub fn transform_to_parent(&self) -> ProjectiveTransform
Maps the node’s space to its parent layer’s: a translation to
Self::origin.
Sourcepub fn draws_within_bounds(&self) -> bool
pub fn draws_within_bounds(&self) -> bool
Whether everything the node draws lies within its rect, give or take
CONTAINED_DRAW_SLACK, as super::LayerNode::draws_within_bounds
says of a layer. Worked out at the first call after a change.