Struct andrew::text::Text[][src]

pub struct Text<'a> {
    pub pos: (usize, usize),
    pub color: [u8; 4],
    pub text: String,
    pub font: Font<'a>,
    pub scale: Scale,
    pub v_metrics: VMetrics,
}

A drawable object that represents text

Fields

The position of the text on the canvas

The color of the text

The text that is rendered to the canvas on draw

The font used in rendering the text

The scale that is applied to the text

The vertical metrics of the text

Methods

impl<'a> Text<'a>
[src]

Creates a new Text object

Calculates the width in pixels of the text

Trait Implementations

impl<'a> Drawable for Text<'a>
[src]

A function that draws the object to a canvas

Auto Trait Implementations

impl<'a> Send for Text<'a>

impl<'a> Sync for Text<'a>