[][src]Struct vxdraw::text::TextOptions

pub struct TextOptions { /* fields omitted */ }

Options when adding a text

Methods

impl TextOptions[src]

pub fn new() -> Self[src]

Create a new text option

pub fn font_size(self, font_size: f32) -> Self[src]

Set the font width and height

pub fn font_size_x(self, font_size: f32) -> Self[src]

Set the font width

pub fn font_size_y(self, font_size: f32) -> Self[src]

Set the font height

pub fn translation(self, trn: (f32, f32)) -> Self[src]

Set the translation

pub fn origin(self, origin: (f32, f32)) -> Self[src]

Set the origin of the text

Each glyph will have its model space translated by the negation of the origin multiplied by the width or height depending on the coordinate. This means an origin of (0.5, 0.5) will put the origin in the center of the entire text block. An origin of (1.0, 1.0) puts the origin in the bottom right of the text block. And (1.0, 0.0) puts the origin in the top-right corner of the text block. You can use any value, even (3.0, -5.0) if you want to, which just means that the text when rotated rotates around that relative point to the text block width and height.

pub fn rotation(self, rotation: f32) -> Self[src]

Set the rotation of the text

pub fn scale(self, scale: f32) -> Self[src]

Set the rotation of the text

Trait Implementations

impl Default for TextOptions[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

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

impl<T> SetParameter for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,