pub struct JourneyBake { /* private fields */ }Expand description
A journey’s moving layers, ready to lay over the still background.
Implementations§
Source§impl JourneyBake
impl JourneyBake
Sourcepub fn new(graph: &SceneGraph, atlas: &GlyphAtlas) -> Option<Self>
pub fn new(graph: &SceneGraph, atlas: &GlyphAtlas) -> Option<Self>
None for a scene that stays put.
Sourcepub fn bytes(&self) -> usize
pub fn bytes(&self) -> usize
Bytes it holds: each moving layer over its whole period, and the bands.
Sourcepub fn band_top(&self) -> u32
pub fn band_top(&self) -> u32
The first row the moving layers reach: above it the frame is the still background’s.
Sourcepub fn draw(
&self,
graph: &SceneGraph,
still: &IndexedImage,
t_ms: u64,
out: &mut IndexedImage,
)
pub fn draw( &self, graph: &SceneGraph, still: &IndexedImage, t_ms: u64, out: &mut IndexedImage, )
The background at t_ms into out: the still background, then each
strip from its offset, back to front.
Sourcepub fn draw_band(
&self,
graph: &SceneGraph,
still: &IndexedImage,
t_ms: u64,
out: &mut IndexedImage,
)
pub fn draw_band( &self, graph: &SceneGraph, still: &IndexedImage, t_ms: u64, out: &mut IndexedImage, )
JourneyBake::draw from JourneyBake::band_top down only: the
rows above are left as they are in out.
Sourcepub fn background_at(
&self,
graph: &SceneGraph,
still: &IndexedImage,
t_ms: u64,
) -> IndexedImage
pub fn background_at( &self, graph: &SceneGraph, still: &IndexedImage, t_ms: u64, ) -> IndexedImage
JourneyBake::draw into a new image.
Trait Implementations§
Source§impl Clone for JourneyBake
impl Clone for JourneyBake
Auto Trait Implementations§
impl Forget for JourneyBake
impl Freeze for JourneyBake
impl Move for JourneyBake
impl RefUnwindSafe for JourneyBake
impl Send for JourneyBake
impl Sync for JourneyBake
impl Unpin for JourneyBake
impl UnsafeUnpin for JourneyBake
impl UnwindSafe for JourneyBake
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