Struct read_fonts::tables::colr::VarColorStop
source · #[repr(C, packed(1))]pub struct VarColorStop {
pub stop_offset: BigEndian<F2Dot14>,
pub palette_index: BigEndian<u16>,
pub alpha: BigEndian<F2Dot14>,
pub var_index_base: BigEndian<u32>,
}
Expand description
VarColorStop record
Fields§
§stop_offset: BigEndian<F2Dot14>
Position on a color line. For variation, use varIndexBase + 0.
palette_index: BigEndian<u16>
Index for a CPAL palette entry.
alpha: BigEndian<F2Dot14>
Alpha value. For variation, use varIndexBase + 1.
var_index_base: BigEndian<u32>
Base index into DeltaSetIndexMap.
Implementations§
source§impl VarColorStop
impl VarColorStop
sourcepub fn stop_offset(&self) -> F2Dot14
pub fn stop_offset(&self) -> F2Dot14
Position on a color line. For variation, use varIndexBase + 0.
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 VarColorStop
impl Clone for VarColorStop
source§fn clone(&self) -> VarColorStop
fn clone(&self) -> VarColorStop
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 VarColorStop
impl Debug for VarColorStop
source§impl FixedSize for VarColorStop
impl FixedSize for VarColorStop
source§const RAW_BYTE_LEN: usize = 10usize
const RAW_BYTE_LEN: usize = 10usize
The raw size of this type, in bytes. Read more
source§impl Hash for VarColorStop
impl Hash for VarColorStop
source§impl Ord for VarColorStop
impl Ord for VarColorStop
source§fn cmp(&self, other: &VarColorStop) -> Ordering
fn cmp(&self, other: &VarColorStop) -> 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 VarColorStop
impl PartialEq for VarColorStop
source§impl PartialOrd for VarColorStop
impl PartialOrd for VarColorStop
source§impl<'a> SomeRecord<'a> for VarColorStop
impl<'a> SomeRecord<'a> for VarColorStop
fn traverse(self, data: FontData<'a>) -> RecordResolver<'a>
impl AnyBitPattern for VarColorStop
impl Copy for VarColorStop
impl Eq for VarColorStop
impl StructuralPartialEq for VarColorStop
Auto Trait Implementations§
impl Freeze for VarColorStop
impl RefUnwindSafe for VarColorStop
impl Send for VarColorStop
impl Sync for VarColorStop
impl Unpin for VarColorStop
impl UnwindSafe for VarColorStop
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,
source§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
.source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)