Struct glium_glyph::GlyphBrush
source · pub struct GlyphBrush<'font, 'a, H: BuildHasher = DefaultSectionHasher> { /* private fields */ }
Implementations§
source§impl<'font, 'p> GlyphBrush<'font, 'p>
impl<'font, 'p> GlyphBrush<'font, 'p>
source§impl<'font, 'p, H: BuildHasher> GlyphBrush<'font, 'p, H>
impl<'font, 'p, H: BuildHasher> GlyphBrush<'font, 'p, H>
sourcepub fn queue_custom_layout<'a, S, G>(&mut self, section: S, custom_layout: &G)where
G: GlyphPositioner,
S: Into<Cow<'a, VariedSection<'a>>>,
pub fn queue_custom_layout<'a, S, G>(&mut self, section: S, custom_layout: &G)where
G: GlyphPositioner,
S: Into<Cow<'a, VariedSection<'a>>>,
Queues a section/layout to be drawn by the next call of
draw_queued
. Can be called multiple times
to queue multiple sections for drawing.
Used to provide custom GlyphPositioner
logic, if using built-in
Layout
simply use queue
Benefits from caching, see caching behaviour.
sourcepub fn queue<'a, S>(&mut self, section: S)where
S: Into<Cow<'a, VariedSection<'a>>>,
pub fn queue<'a, S>(&mut self, section: S)where
S: Into<Cow<'a, VariedSection<'a>>>,
Queues a section/layout to be drawn by the next call of
draw_queued
. Can be called multiple times
to queue multiple sections for drawing.
Benefits from caching, see caching behaviour.
pub fn draw_queued<F: Facade + Deref<Target = Context>>(
&mut self,
facade: &F,
frame: &mut Frame
)
pub fn draw_queued_with_transform<F: Facade + Deref<Target = Context>>(
&mut self,
transform: [[f32; 4]; 4],
facade: &F,
frame: &mut Frame
)
sourcepub fn fonts(&self) -> &[Font<'font>]
pub fn fonts(&self) -> &[Font<'font>]
Returns the available fonts.
The FontId
corresponds to the index of the font data.
pub fn add_font_bytes<'a: 'font, B: Into<SharedBytes<'a>>>(
&mut self,
font_data: B
) -> FontId
Auto Trait Implementations§
impl<'font, 'a, H = BuildHasherDefault<SeaHasher>> !RefUnwindSafe for GlyphBrush<'font, 'a, H>
impl<'font, 'a, H = BuildHasherDefault<SeaHasher>> !Send for GlyphBrush<'font, 'a, H>
impl<'font, 'a, H = BuildHasherDefault<SeaHasher>> !Sync for GlyphBrush<'font, 'a, H>
impl<'font, 'a, H> Unpin for GlyphBrush<'font, 'a, H>where
H: Unpin,
impl<'font, 'a, H = BuildHasherDefault<SeaHasher>> !UnwindSafe for GlyphBrush<'font, 'a, H>
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read more§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more§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. Read more§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. Read more