pub struct LayoutPlan { /* private fields */ }Expand description
A layout tree, evaluated once when it does not animate.
Implementations§
Source§impl LayoutPlan
impl LayoutPlan
Sourcepub fn new(root: &LayoutNode, canvas: (u32, u32)) -> Self
pub fn new(root: &LayoutNode, canvas: (u32, u32)) -> Self
Plans root for a canvas of (width, height) pixels, evaluating it
when nothing in it animates.
Sourcepub fn evaluate(&self, time: MediaTime) -> Arc<EvaluatedLayout> ⓘ
pub fn evaluate(&self, time: MediaTime) -> Arc<EvaluatedLayout> ⓘ
The tree at picture time time; the same shared value at every time
when nothing animates.
Sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Whether anything in the tree animates.
Sourcepub const fn root(&self) -> &LayoutNode
pub const fn root(&self) -> &LayoutNode
The tree the plan evaluates: the model tree with its pixels turned into fractions of the canvas’s shorter side.
Trait Implementations§
Source§impl Clone for LayoutPlan
impl Clone for LayoutPlan
Source§impl Debug for LayoutPlan
impl Debug for LayoutPlan
Auto Trait Implementations§
impl Freeze for LayoutPlan
impl RefUnwindSafe for LayoutPlan
impl Send for LayoutPlan
impl Sync for LayoutPlan
impl Unpin for LayoutPlan
impl UnsafeUnpin for LayoutPlan
impl UnwindSafe for LayoutPlan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more