pub struct Pan {
pub from: (f32, f32),
pub to: (f32, f32),
pub zoom: u8,
}Expand description
A pan over a picture shown as the frame’s backdrop (game ADR-0048): the
picture’s pixel from in the middle of the screen when the shot
starts, to when it ends, eased in and out (ease_in_out), at one
whole zoom for the whole shot.
Fields§
§from: (f32, f32)The picture’s pixel in the middle of the screen at the start.
to: (f32, f32)The picture’s pixel in the middle of the screen at the end.
zoom: u8Screen pixels per picture pixel.
Implementations§
Source§impl Pan
impl Pan
Sourcepub fn centre(&self, progress: f32) -> (f32, f32)
pub fn centre(&self, progress: f32) -> (f32, f32)
The picture’s pixel in the middle of the screen progress (0 to 1)
through the shot.
Sourcepub fn origin_px(
&self,
console: ConsoleSpec,
picture_px: (u32, u32),
screen: Rect,
progress: f32,
) -> (f32, f32)
pub fn origin_px( &self, console: ConsoleSpec, picture_px: (u32, u32), screen: Rect, progress: f32, ) -> (f32, f32)
The picture’s pixel at the top-left of a screen of screen’s cells
of console (cinema::view), progress through the shot, over a
picture picture_px big: the backdrop’s origin_px.
Trait Implementations§
impl Copy for Pan
impl StructuralPartialEq for Pan
Auto Trait Implementations§
impl Freeze for Pan
impl RefUnwindSafe for Pan
impl Send for Pan
impl Sync for Pan
impl Unpin for Pan
impl UnsafeUnpin for Pan
impl UnwindSafe for Pan
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