[−][src]Struct vulkano_glyph::GlyphBrush
Object responsible for drawing text to the screen.
Methods
impl<'font> GlyphBrush<'font>
[src]
pub fn new(
device: &Arc<Device>,
subpass: Subpass<Arc<dyn RenderPassAbstract + Send + Sync>>
) -> Result<Self>
[src]
device: &Arc<Device>,
subpass: Subpass<Arc<dyn RenderPassAbstract + Send + Sync>>
) -> Result<Self>
Create a new GlyphBrush
for use in the given subpass.
pub fn queue_glyphs<I>(
&mut self,
glyphs: I,
font: FontId,
color: [f32; 4]
) -> Section where
I: IntoIterator<Item = PositionedGlyph<'font>>,
[src]
&mut self,
glyphs: I,
font: FontId,
color: [f32; 4]
) -> Section where
I: IntoIterator<Item = PositionedGlyph<'font>>,
Queue some glyphs for later drawing. The Section
returned is valid until a later call
to GlyphBrush::clear
.
pub fn cache_sections<'a, I>(
&mut self,
queue: &Arc<Queue>,
sections: I
) -> Result<Option<CommandBufferExecFuture<NowFuture, AutoCommandBuffer>>> where
I: IntoIterator<Item = &'a Section>,
[src]
&mut self,
queue: &Arc<Queue>,
sections: I
) -> Result<Option<CommandBufferExecFuture<NowFuture, AutoCommandBuffer>>> where
I: IntoIterator<Item = &'a Section>,
Cache some sections of text. If a future is returned, it should be executed before drawing those sections. This may overwrite cached sections from previous calls to this function.
pub fn draw<'a, I>(
&mut self,
cmd: AutoCommandBufferBuilder,
sections: I,
state: &DynamicState,
transform: [[f32; 4]; 4],
dims: [f32; 2]
) -> Result<AutoCommandBufferBuilder> where
I: IntoIterator<Item = &'a Section>,
[src]
&mut self,
cmd: AutoCommandBufferBuilder,
sections: I,
state: &DynamicState,
transform: [[f32; 4]; 4],
dims: [f32; 2]
) -> Result<AutoCommandBufferBuilder> where
I: IntoIterator<Item = &'a Section>,
Draw a section of text to the screen. The section should have been previously cached
using GlyphBrush::cache_sections
.
pub fn clear(&mut self)
[src]
Clear the internal glyph buffer. This invalidates all Section
objects created by this
GlyphBrush
.
Auto Trait Implementations
impl<'font> Send for GlyphBrush<'font>
impl<'font> Sync for GlyphBrush<'font>
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
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> 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,