pub struct BackgroundColor {
pub blue: u8,
pub green: u8,
pub red: u8,
pub alpha: u8,
}Expand description
Background color from §2.7.1.1 — the Background Color field,
laid out on disk in [Blue, Green, Red, Alpha] byte order.
§2.7.1.1: “This color MAY be used to fill the unused space on the
canvas around the frames, as well as the transparent pixels of the
first frame.” It may carry a non-opaque alpha even when the
VP8X.L alpha flag is unset.
Fields§
§blue: u8Blue channel (on-disk byte 0).
green: u8Green channel (on-disk byte 1).
red: u8Red channel (on-disk byte 2).
alpha: u8Alpha channel (on-disk byte 3). 255 = opaque.
Implementations§
Source§impl BackgroundColor
impl BackgroundColor
Sourcepub const fn as_u32_le(&self) -> u32
pub const fn as_u32_le(&self) -> u32
Pack the four components as a uint32 in on-disk byte
order — i.e. the same little-endian-loaded value the trace
records as bgcolor=0xXXXXXXXX.
For ff ff ff ff on disk this returns 0xffff_ffff; for the
degenerate “all zero” payload it returns 0x0000_0000. The
integer’s byte layout (LSB→MSB) is exactly [B, G, R, A].
Trait Implementations§
Source§impl Clone for BackgroundColor
impl Clone for BackgroundColor
Source§fn clone(&self) -> BackgroundColor
fn clone(&self) -> BackgroundColor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for BackgroundColor
Source§impl Debug for BackgroundColor
impl Debug for BackgroundColor
impl Eq for BackgroundColor
Source§impl PartialEq for BackgroundColor
impl PartialEq for BackgroundColor
Source§fn eq(&self, other: &BackgroundColor) -> bool
fn eq(&self, other: &BackgroundColor) -> bool
self and other values to be equal, and is used by ==.