pub enum RenderBitmap {
Coverage {
width: u32,
height: u32,
coverage: Arc<Vec<u8>>,
x: i32,
y: i32,
color: [u8; 4],
},
Rgba {
width: u32,
height: u32,
pixels: Arc<Vec<u8>>,
x: i32,
y: i32,
},
}Expand description
A positioned bitmap — the renderer’s libass-ASS_Image-style output unit. A
frame is a list of these; the caller (or composite_bitmap) blends them.
The common case is Coverage (A8 + one colour): producing it from a cached
tile is an Arc clone, so geometry-static animated layers cost almost nothing
per frame. Complex effects that mix colours within a layer (blur, swept
karaoke, clip) are pre-composited into an Rgba tile.
Variants§
Coverage
An 8-bit coverage mask plus a single straight RGBA colour.
Fields
Rgba
A pre-composited premultiplied-RGBA tile (width * height * 4 bytes).
Trait Implementations§
Source§impl Clone for RenderBitmap
impl Clone for RenderBitmap
Source§fn clone(&self) -> RenderBitmap
fn clone(&self) -> RenderBitmap
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 moreAuto Trait Implementations§
impl Freeze for RenderBitmap
impl RefUnwindSafe for RenderBitmap
impl Send for RenderBitmap
impl Sync for RenderBitmap
impl Unpin for RenderBitmap
impl UnsafeUnpin for RenderBitmap
impl UnwindSafe for RenderBitmap
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
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