pub struct GlyphRunProps<'a> {
pub font: FontData,
pub font_size: f32,
pub hint: bool,
pub normalized_coords: &'a [NormalizedCoord],
pub style: StyleRef<'a>,
pub brush: BrushRef<'a>,
pub brush_alpha: f32,
pub transform: Affine,
pub glyph_transform: Option<Affine>,
}Expand description
Rendering properties shared by a glyph run.
Fields§
§font: FontData§font_size: f32§hint: bool§normalized_coords: &'a [NormalizedCoord]§style: StyleRef<'a>§brush: BrushRef<'a>§brush_alpha: f32§transform: Affine§glyph_transform: Option<Affine>Implementations§
Source§impl<'a> GlyphRunProps<'a>
impl<'a> GlyphRunProps<'a>
pub fn new(font: &FontData) -> Self
pub fn font(self, font: &FontData) -> Self
pub fn font_size(self, font_size: f32) -> Self
pub fn hint(self, hint: bool) -> Self
pub fn normalized_coords(self, normalized_coords: &'a [NormalizedCoord]) -> Self
pub fn style(self, style: impl Into<StyleRef<'a>>) -> Self
pub fn brush(self, brush: impl Into<BrushRef<'a>>) -> Self
pub fn brush_alpha(self, brush_alpha: f32) -> Self
pub fn transform(self, transform: Affine) -> Self
pub fn glyph_transform(self, glyph_transform: Option<Affine>) -> Self
Trait Implementations§
Source§impl<'a> Clone for GlyphRunProps<'a>
impl<'a> Clone for GlyphRunProps<'a>
Source§fn clone(&self) -> GlyphRunProps<'a>
fn clone(&self) -> GlyphRunProps<'a>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'a> Freeze for GlyphRunProps<'a>
impl<'a> !RefUnwindSafe for GlyphRunProps<'a>
impl<'a> Send for GlyphRunProps<'a>
impl<'a> Sync for GlyphRunProps<'a>
impl<'a> Unpin for GlyphRunProps<'a>
impl<'a> UnsafeUnpin for GlyphRunProps<'a>
impl<'a> !UnwindSafe for GlyphRunProps<'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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.