[−][src]Struct glium_glyph::GlyphBrush
Methods
impl<'font, 'p> GlyphBrush<'font, 'p>
[src]
impl<'font, 'p, H: BuildHasher> GlyphBrush<'font, 'p, H>
[src]
pub fn queue_custom_layout<'a, S, G>(&mut self, section: S, custom_layout: &G) where
G: GlyphPositioner,
S: Into<Cow<'a, VariedSection<'a>>>,
[src]
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.
pub fn queue<'a, S>(&mut self, section: S) where
S: Into<Cow<'a, VariedSection<'a>>>,
[src]
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
)
[src]
&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
)
[src]
&mut self,
transform: [[f32; 4]; 4],
facade: &F,
frame: &mut Frame
)
pub fn add_font_bytes<'a: 'font, B: Into<SharedBytes<'a>>>(
&mut self,
font_data: B
) -> FontId
[src]
&mut self,
font_data: B
) -> FontId
pub fn add_font<'a: 'font>(&mut self, font_data: Font<'a>) -> FontId
[src]
Adds an additional font to the one(s) initially added on build.
Returns a new FontId
to reference this font.
Trait Implementations
impl<'font, 'l, H: BuildHasher> GlyphCruncher<'font> for GlyphBrush<'font, 'l, H>
[src]
fn pixel_bounds_custom_layout<'a, S, L>(
&mut self,
section: S,
custom_layout: &L
) -> Option<Rect<i32>> where
L: GlyphPositioner + Hash,
S: Into<Cow<'a, VariedSection<'a>>>,
[src]
&mut self,
section: S,
custom_layout: &L
) -> Option<Rect<i32>> where
L: GlyphPositioner + Hash,
S: Into<Cow<'a, VariedSection<'a>>>,
fn glyphs_custom_layout<'a, 'b, S, L>(
&'b mut self,
section: S,
custom_layout: &L
) -> PositionedGlyphIter<'b, 'font> where
L: GlyphPositioner + Hash,
S: Into<Cow<'a, VariedSection<'a>>>,
[src]
&'b mut self,
section: S,
custom_layout: &L
) -> PositionedGlyphIter<'b, 'font> where
L: GlyphPositioner + Hash,
S: Into<Cow<'a, VariedSection<'a>>>,
fn fonts(&self) -> &[Font<'font>]
[src]
Returns the available fonts.
The FontId
corresponds to the index of the font data.
default fn pixel_bounds<'a, S>(&mut self, section: S) -> Option<Rect<i32>> where
S: Into<Cow<'a, VariedSection<'a>>>,
[src]
S: Into<Cow<'a, VariedSection<'a>>>,
Returns the pixel bounding box for the input section. The box is a conservative whole number pixel rectangle that can contain the section. Read more
default fn glyphs<'a, S>(
&'b mut self,
section: S
) -> Map<Iter<'b, (PositionedGlyph<'font>, [f32; 4], FontId)>, fn(&'b (PositionedGlyph<'font>, [f32; 4], FontId)) -> &'b PositionedGlyph<'font>> where
S: Into<Cow<'a, VariedSection<'a>>>,
[src]
&'b mut self,
section: S
) -> Map<Iter<'b, (PositionedGlyph<'font>, [f32; 4], FontId)>, fn(&'b (PositionedGlyph<'font>, [f32; 4], FontId)) -> &'b PositionedGlyph<'font>> where
S: Into<Cow<'a, VariedSection<'a>>>,
Returns an iterator over the PositionedGlyph
s of the given section. Read more
Auto Trait Implementations
impl<'font, 'a, H = RandomXxHashBuilder> !Send for GlyphBrush<'font, 'a, H>
impl<'font, 'a, H = RandomXxHashBuilder> !Sync for GlyphBrush<'font, 'a, H>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,