pub struct LegacyPaintDispatcher<'a> { /* private fields */ }Expand description
Maps NodeIds to ChildComponents and dispatches paint to their
Painter::paint_content impls.
Implementations§
Source§impl<'a> LegacyPaintDispatcher<'a>
impl<'a> LegacyPaintDispatcher<'a>
pub fn new(components: &'a [Option<&'a ChildComponent>]) -> Self
Sourcepub fn for_scene(built: &'a BuiltScene<'a>) -> Self
pub fn for_scene(built: &'a BuiltScene<'a>) -> Self
Build from a [BuiltScene], carrying its stagger delays so internal
animations shift by the same amount as the CSS overrides, and its
per-node time remaps so internal animations (counter, draw_in,
typewriter…) advance at the same local time as the CSS overrides.
Trait Implementations§
Source§impl<'a> PaintDispatcher for LegacyPaintDispatcher<'a>
impl<'a> PaintDispatcher for LegacyPaintDispatcher<'a>
Source§fn dispatch(
&self,
canvas: &Canvas,
payload: &(dyn Any + Send + Sync),
_css: &CssStyle,
layout: &BoxLayout,
frame: &PaintFrame,
)
fn dispatch( &self, canvas: &Canvas, payload: &(dyn Any + Send + Sync), _css: &CssStyle, layout: &BoxLayout, frame: &PaintFrame, )
Called for
BoxKind::Component(payload). Implementations downcast
payload to the concrete component type and paint into canvas.
The canvas is already translated to the content-box origin and
clipped if overflow: hidden.Auto Trait Implementations§
impl<'a> Freeze for LegacyPaintDispatcher<'a>
impl<'a> RefUnwindSafe for LegacyPaintDispatcher<'a>
impl<'a> Send for LegacyPaintDispatcher<'a>
impl<'a> Sync for LegacyPaintDispatcher<'a>
impl<'a> Unpin for LegacyPaintDispatcher<'a>
impl<'a> UnsafeUnpin for LegacyPaintDispatcher<'a>
impl<'a> UnwindSafe for LegacyPaintDispatcher<'a>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more