pub struct Layer {
pub source: LayerSource,
pub grade: Grade,
pub from: i64,
pub to: i64,
pub rects: Vec<Crop>,
pub rotation: Vec<f32>,
pub blend: BlendMode,
}Expand description
One layer over output frames from..to.
Fields§
§source: LayerSource§grade: GradeThe layer’s grade; size is its texture size (default: the source’s). Hook tracks and
crops are indexed by layer frame (0 = output frame from).
from: i64§to: i64§rects: Vec<Crop>Placement in output pixels per layer frame (the last one holds); empty fills the frame.
rotation: Vec<f32>Rotation in degrees per layer frame, counter-clockwise on screen about the rectangle’s middle (the last one holds); empty is unrotated. Corners outside the picture stay transparent.
blend: BlendModeImplementations§
Source§impl Layer
impl Layer
Sourcepub fn rect_at(&self, frame: i64, width: u32, height: u32) -> Option<Crop>
pub fn rect_at(&self, frame: i64, width: u32, height: u32) -> Option<Crop>
The placement at output frame frame, None outside from..to.
Sourcepub fn rotation_at(&self, frame: i64) -> f32
pub fn rotation_at(&self, frame: i64) -> f32
The rotation at output frame frame (0 outside from..to).
Sourcepub fn needs_composite(&self, frame: i64) -> bool
pub fn needs_composite(&self, frame: i64) -> bool
Whether frame frame needs the composite pass (turned, or blended other than normal).
Trait Implementations§
impl StructuralPartialEq for Layer
Auto Trait Implementations§
impl Forget for Layer
impl Freeze for Layer
impl RefUnwindSafe for Layer
impl Send for Layer
impl Sync for Layer
impl Unpin for Layer
impl UnsafeUnpin for Layer
impl UnwindSafe for Layer
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