pub struct TextDimensions {
    pub width: f32,
    pub height: f32,
    pub offset_y: f32,
}
Expand description

World space dimensions of the text, measured by “measure_text” function

Fields

width: f32

Distance from very left to very right of the rasterized text

height: f32

Distance from the bottom to the top of the text.

offset_y: f32

Height offset from the baseline of the text. “draw_text(.., X, Y, ..)” will be rendered in a “Rect::new(X, Y - dimensions.offset_y, dimensions.width, dimensions.height)” For reference check “text_dimensions” example.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.