Struct FrameInfo
#[repr(C)]pub struct FrameInfo {
pub required_frame: i32,
pub duration: i32,
pub fully_received: bool,
pub alpha_type: SkAlphaType,
pub has_alpha_within_bounds: bool,
pub disposal_method: SkCodecAnimation_DisposalMethod,
pub blend: SkCodecAnimation_Blend,
pub rect: IRect,
}Expand description
Information about individual frames in a multi-framed image.
Fields§
§required_frame: i32The frame that this frame needs to be blended with, or NO_FRAME if this frame is
independent (so it can be drawn over an uninitialized buffer).
Note that this is the earliest frame that can be used for blending. Any frame from
[required_frame, i) can be used, unless its disposal_method is
codec_animation::DisposalMethod::RestorePrevious.
duration: i32Number of milliseconds to show this frame.
fully_received: boolWhether the end marker for this frame is contained in the stream.
Note: this does not guarantee that an attempt to decode will be complete. There could be an error in the stream.
alpha_type: SkAlphaTypeThis is conservative; it will still return non-opaque if e.g. a color index-based frame has a color with alpha but does not use it.
has_alpha_within_bounds: boolWhether the updated rectangle contains alpha.
This is conservative; it will still be set to true if e.g. a color index-based frame has a
color with alpha but does not use it. In addition, it may be set to true, even if the final
frame, after blending, is opaque.
disposal_method: SkCodecAnimation_DisposalMethodHow this frame should be modified before decoding the next one.
blend: SkCodecAnimation_BlendHow this frame should blend with the prior frame.
rect: IRectThe rectangle updated by this frame.
It may be empty, if the frame does not change the image. It will always be contained by
Codec::dimensions().
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameInfo
impl RefUnwindSafe for FrameInfo
impl Send for FrameInfo
impl Sync for FrameInfo
impl Unpin for FrameInfo
impl UnsafeUnpin for FrameInfo
impl UnwindSafe for FrameInfo
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
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.