pub struct GlyphGeometry { /* private fields */ }
Expand description
The GlyphGeometry
structure contains width and positioning
information for a single glyph.
Note that @width is not guaranteed to be the same as the glyph extents. Kerning and other positioning applied during shaping will affect both the @width and the @x_offset for the glyphs in the glyph string that results from shaping.
The information in this struct is intended for rendering the glyphs, as follows:
- Assume the current point is (x, y)
- Render the current glyph at (x + x_offset, y + y_offset),
- Advance the current point to (x + width, y)
- Render the next glyph
GLib type: Inline allocated boxed type with stack copy semantics.
Implementations§
Source§impl GlyphGeometry
impl GlyphGeometry
pub fn as_ptr(&self) -> *mut PangoGlyphGeometry
Sourcepub unsafe fn from_glib_ptr_borrow<'a>(
ptr: *const PangoGlyphGeometry,
) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const PangoGlyphGeometry, ) -> &'a Self
Borrows the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow_mut<'a>(
ptr: *mut PangoGlyphGeometry,
) -> &'a mut Self
pub unsafe fn from_glib_ptr_borrow_mut<'a>( ptr: *mut PangoGlyphGeometry, ) -> &'a mut Self
Borrows the underlying C value mutably.
Trait Implementations§
Source§impl Clone for GlyphGeometry
impl Clone for GlyphGeometry
Source§impl Debug for GlyphGeometry
impl Debug for GlyphGeometry
impl Copy for GlyphGeometry
Auto Trait Implementations§
impl Freeze for GlyphGeometry
impl RefUnwindSafe for GlyphGeometry
impl Send for GlyphGeometry
impl Sync for GlyphGeometry
impl Unpin for GlyphGeometry
impl UnwindSafe for GlyphGeometry
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§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
)