pub struct VideoLayer {
pub rect: VideoRect,
pub z_index: i32,
pub opacity: f32,
pub visible: bool,
pub fit: VideoFit,
pub source: Option<VideoSourceRect>,
}Expand description
Runtime-adjustable spatial settings for one compositor input.
Fields§
§rect: VideoRectOutput-space destination and clipping rectangle.
z_index: i32Stacking order; larger values are drawn over smaller values.
opacity: f32Layer alpha in the inclusive range 0.0..=1.0.
visible: boolWhether the compositor draws this layer.
fit: VideoFitAspect-ratio policy used to map the input into Self::rect.
source: Option<VideoSourceRect>The part of the input to draw, or None for all of it.
Applied before Self::fit: what is drawn is this region, and the
aspect ratio the fit preserves is this region’s rather than the whole
frame’s. Cropping a 16:9 capture to a square and containing it in a
square rectangle therefore fills it, which is what asking for both
means.
Implementations§
Trait Implementations§
Source§impl Clone for VideoLayer
impl Clone for VideoLayer
Source§fn clone(&self) -> VideoLayer
fn clone(&self) -> VideoLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for VideoLayer
Source§impl Debug for VideoLayer
impl Debug for VideoLayer
Source§impl PartialEq for VideoLayer
impl PartialEq for VideoLayer
impl StructuralPartialEq for VideoLayer
Auto Trait Implementations§
impl Freeze for VideoLayer
impl RefUnwindSafe for VideoLayer
impl Send for VideoLayer
impl Sync for VideoLayer
impl Unpin for VideoLayer
impl UnsafeUnpin for VideoLayer
impl UnwindSafe for VideoLayer
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