pub struct PipState {
pub pos_x: f64,
pub pos_y: f64,
pub scale_x: f64,
pub scale_y: f64,
pub opacity: f64,
}Expand description
Interpolated state at a specific timeline position.
Fields§
§pos_x: f64Horizontal position (normalised).
pos_y: f64Vertical position (normalised).
scale_x: f64Horizontal scale.
scale_y: f64Vertical scale.
opacity: f64Opacity.
Implementations§
Source§impl PipState
impl PipState
Sourcepub fn pixel_rect(
&self,
frame_width: u32,
frame_height: u32,
) -> (i32, i32, u32, u32)
pub fn pixel_rect( &self, frame_width: u32, frame_height: u32, ) -> (i32, i32, u32, u32)
Compute pixel-space bounding box given primary frame dimensions.
Returns (left, top, width, height) in pixels.
Sourcepub fn is_invisible(&self) -> bool
pub fn is_invisible(&self) -> bool
Returns true if the PiP is effectively invisible (opacity < threshold).
Trait Implementations§
impl StructuralPartialEq for PipState
Auto Trait Implementations§
impl Freeze for PipState
impl RefUnwindSafe for PipState
impl Send for PipState
impl Sync for PipState
impl Unpin for PipState
impl UnsafeUnpin for PipState
impl UnwindSafe for PipState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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