[][src]Struct sciter::graphics::TextMetrics

pub struct TextMetrics {
    pub min_width: Dim,
    pub max_width: Dim,
    pub height: Dim,
    pub ascent: Dim,
    pub descent: Dim,
    pub lines: u32,
}

Metrics of a text layout object.

Fields

min_width: Dim

Minimum width, is a width of the widest word (non-breakable sequence) in the text.

max_width: Dim

Maximum width, is the width of the text without wrapping.

If the text contains new line sequences then function returns width of widest string.

height: Dim

Computed height of the Text object and box height.

ascent: Dimdescent: Dimlines: u32

Mumber of lines in text layout.

To get meaningful values you should set width of the text layout object (with Text.set_box, for example).

Trait Implementations

impl Debug for TextMetrics[src]

impl Default for TextMetrics[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.