Struct kiss3d::text::TextRenderer
[−]
[src]
pub struct TextRenderer { /* fields omitted */ }
A ttf text renderer.
Methods
impl TextRenderer
[src]
fn new() -> TextRenderer
Creates a new text renderer with font
as the default font.
fn draw_text(&mut self,
text: &str,
pos: &Point2<f32>,
font: &Rc<Font>,
color: &Point3<f32>)
text: &str,
pos: &Point2<f32>,
font: &Rc<Font>,
color: &Point3<f32>)
Adds a piece of text to be drawn during the next frame. The text is not persistent between frames. This method must be called for each text to draw, and at each update loop iteration.
fn render(&mut self, width: f32, height: f32)
Actually draws the text.