Struct graphics::text::Text
[−]
[src]
pub struct Text { pub color: Color, pub font_size: FontSize, }
Renders text
Fields
color | The color |
font_size | The font size |
Methods
impl Text
fn new(font_size: FontSize) -> Text
Creates a new text with black color
fn colored(color: Color, font_size: FontSize) -> Text
Creates a new colored text
fn draw<C, G>(&self, text: &str, cache: &mut C, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where C: CharacterCache, G: Graphics<Texture=C::Texture>
Draws text with a character cache