Struct read_fonts::tables::colr::VarColorIndex
source · #[repr(C, packed(1))]pub struct VarColorIndex {
pub palette_index: BigEndian<u16>,
pub alpha: BigEndian<F2Dot14>,
pub var_index_base: BigEndian<u32>,
}
Expand description
VarColorIndex record
Fields§
§palette_index: BigEndian<u16>
Index for a CPAL palette entry.
alpha: BigEndian<F2Dot14>
Alpha value. For variation, use varIndexBase + 0.
var_index_base: BigEndian<u32>
Base index into DeltaSetIndexMap.
Implementations§
source§impl VarColorIndex
impl VarColorIndex
sourcepub fn palette_index(&self) -> u16
pub fn palette_index(&self) -> u16
Index for a CPAL palette entry.
sourcepub fn var_index_base(&self) -> u32
pub fn var_index_base(&self) -> u32
Base index into DeltaSetIndexMap.
Trait Implementations§
source§impl Clone for VarColorIndex
impl Clone for VarColorIndex
source§fn clone(&self) -> VarColorIndex
fn clone(&self) -> VarColorIndex
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VarColorIndex
impl Debug for VarColorIndex
source§impl FixedSize for VarColorIndex
impl FixedSize for VarColorIndex
source§const RAW_BYTE_LEN: usize = 8usize
const RAW_BYTE_LEN: usize = 8usize
The raw size of this type, in bytes. Read more
source§impl Hash for VarColorIndex
impl Hash for VarColorIndex
source§impl Ord for VarColorIndex
impl Ord for VarColorIndex
source§fn cmp(&self, other: &VarColorIndex) -> Ordering
fn cmp(&self, other: &VarColorIndex) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for VarColorIndex
impl PartialEq for VarColorIndex
source§fn eq(&self, other: &VarColorIndex) -> bool
fn eq(&self, other: &VarColorIndex) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for VarColorIndex
impl PartialOrd for VarColorIndex
source§fn partial_cmp(&self, other: &VarColorIndex) -> Option<Ordering>
fn partial_cmp(&self, other: &VarColorIndex) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<'a> SomeRecord<'a> for VarColorIndex
impl<'a> SomeRecord<'a> for VarColorIndex
fn traverse(self, data: FontData<'a>) -> RecordResolver<'a>
impl AnyBitPattern for VarColorIndex
impl Copy for VarColorIndex
impl Eq for VarColorIndex
impl StructuralPartialEq for VarColorIndex
Auto Trait Implementations§
impl Freeze for VarColorIndex
impl RefUnwindSafe for VarColorIndex
impl Send for VarColorIndex
impl Sync for VarColorIndex
impl Unpin for VarColorIndex
impl UnwindSafe for VarColorIndex
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> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.