pub trait RoundTree: TraverseTree {
// Required methods
fn get_unrounded_layout(&self, node_id: NodeId) -> Layout;
fn set_final_layout(&mut self, node_id: NodeId, layout: &Layout);
}
Expand description
Trait used by the round_layout
method which takes a tree of unrounded float-valued layouts and performs
rounding to snap the values to the pixel grid.
As indicated by it’s dependence on TraverseTree
, it required full recursive access to the tree.
Required Methods§
Sourcefn get_unrounded_layout(&self, node_id: NodeId) -> Layout
fn get_unrounded_layout(&self, node_id: NodeId) -> Layout
Get the node’s unrounded layout
Sourcefn set_final_layout(&mut self, node_id: NodeId, layout: &Layout)
fn set_final_layout(&mut self, node_id: NodeId, layout: &Layout)
Get a reference to the node’s final layout
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.