[][src]Struct glium_glyph::GlyphBrush

pub struct GlyphBrush<'font, 'a, H: BuildHasher = DefaultSectionHasher> { /* fields omitted */ }

Methods

impl<'font, 'p> GlyphBrush<'font, 'p>[src]

pub fn new<'a: 'font, F: Facade, V: Into<Vec<Font<'a>>>>(
    facade: &F,
    fonts: V
) -> Self
[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]

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]

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]

pub fn draw_queued_with_transform<F: Facade + Deref<Target = Context>>(
    &mut self,
    transform: [[f32; 4]; 4],
    facade: &F,
    frame: &mut Frame
)
[src]

pub fn add_font_bytes<'a: 'font, B: Into<SharedBytes<'a>>>(
    &mut self,
    font_data: B
) -> FontId
[src]

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 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]

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]

Returns an iterator over the PositionedGlyphs 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]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.