pub struct GlyphRun<'a> {
pub font: &'a GlyphFont,
pub size: f64,
pub transform: Affine,
pub glyphs: &'a [RunGlyph],
pub text: &'a str,
pub paint: Paint,
}Expand description
A shaped run, ready to draw with Canvas::glyphs.
Fields§
§font: &'a GlyphFontThe face, embedded by EditDoc::embed_glyph_font
in this session.
size: f64The font size, in run-space units.
transform: AffineRun space to canvas space. Run space is text space: y up, glyphs upright; a caller in a y-down space flips here.
glyphs: &'a [RunGlyph]The glyphs, in drawing order.
text: &'a strThe text the run was shaped from, which the glyphs’ ranges index.
paint: PaintHow the glyphs are painted: filled, stroked (text render mode 1), or both (mode 2, a synthetic bold).
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GlyphRun<'a>
impl<'a> RefUnwindSafe for GlyphRun<'a>
impl<'a> Send for GlyphRun<'a>
impl<'a> Sync for GlyphRun<'a>
impl<'a> Unpin for GlyphRun<'a>
impl<'a> UnsafeUnpin for GlyphRun<'a>
impl<'a> UnwindSafe for GlyphRun<'a>
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§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.