#[repr(C, packed(1))]pub struct SmallGlyphMetrics {
pub height: u8,
pub width: u8,
pub bearing_x: BigEndian<i8>,
pub bearing_y: BigEndian<i8>,
pub advance: u8,
}
Expand description
SmallGlyphMetrics record.
Fields§
§height: u8
Number of rows of data.
width: u8
Number of columns of data.
bearing_x: BigEndian<i8>
Distance in pixels from the horizontal origin to the left edge of the bitmap (for horizontal text); or distance in pixels from the vertical origin to the top edge of the bitmap (for vertical text).
bearing_y: BigEndian<i8>
Distance in pixels from the horizontal origin to the top edge of the bitmap (for horizontal text); or distance in pixels from the vertical origin to the left edge of the bitmap (for vertical text).
advance: u8
Horizontal or vertical advance width in pixels.
Implementations§
Source§impl SmallGlyphMetrics
impl SmallGlyphMetrics
Sourcepub fn bearing_x(&self) -> i8
pub fn bearing_x(&self) -> i8
Distance in pixels from the horizontal origin to the left edge of the bitmap (for horizontal text); or distance in pixels from the vertical origin to the top edge of the bitmap (for vertical text).
Trait Implementations§
Source§impl Clone for SmallGlyphMetrics
impl Clone for SmallGlyphMetrics
Source§fn clone(&self) -> SmallGlyphMetrics
fn clone(&self) -> SmallGlyphMetrics
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 SmallGlyphMetrics
impl Debug for SmallGlyphMetrics
Source§impl FixedSize for SmallGlyphMetrics
impl FixedSize for SmallGlyphMetrics
Source§const RAW_BYTE_LEN: usize = 5usize
const RAW_BYTE_LEN: usize = 5usize
The raw size of this type, in bytes. Read more
Source§impl Hash for SmallGlyphMetrics
impl Hash for SmallGlyphMetrics
Source§impl Ord for SmallGlyphMetrics
impl Ord for SmallGlyphMetrics
Source§fn cmp(&self, other: &SmallGlyphMetrics) -> Ordering
fn cmp(&self, other: &SmallGlyphMetrics) -> 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 SmallGlyphMetrics
impl PartialEq for SmallGlyphMetrics
Source§impl PartialOrd for SmallGlyphMetrics
impl PartialOrd for SmallGlyphMetrics
impl AnyBitPattern for SmallGlyphMetrics
impl Copy for SmallGlyphMetrics
impl Eq for SmallGlyphMetrics
impl StructuralPartialEq for SmallGlyphMetrics
Auto Trait Implementations§
impl Freeze for SmallGlyphMetrics
impl RefUnwindSafe for SmallGlyphMetrics
impl Send for SmallGlyphMetrics
impl Sync for SmallGlyphMetrics
impl Unpin for SmallGlyphMetrics
impl UnwindSafe for SmallGlyphMetrics
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
.