Struct ggez::graphics::Text
[−]
[src]
pub struct Text { /* fields omitted */ }
Drawable text created from a Font
.
Methods
impl Text
[src]
fn new(context: &mut Context, text: &str, font: &Font) -> GameResult<Text>
Renders a new Text
from the given Font
fn width(&self) -> u32
Returns the width of the rendered text, in pixels.
fn height(&self) -> u32
Returns the height of the rendered text, in pixels.
fn contents(&self) -> &str
Returns the string that the text represents.
fn get_dimensions(&self) -> Rect
Returns the dimensions of the rendered text.
fn get_filter(&self) -> FilterMode
Get the filter mode for the the rendered text.
fn set_filter(&mut self, mode: FilterMode)
Set the filter mode for the the rendered text.
Trait Implementations
impl Clone for Text
[src]
fn clone(&self) -> Text
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Drawable for Text
[src]
fn draw_ex(&self, ctx: &mut Context, param: DrawParam) -> GameResult<()>
Actually draws the object to the screen. Read more
fn draw(&self, ctx: &mut Context, dest: Point, rotation: f32) -> GameResult<()>
Draws the drawable onto the rendering target. Read more