[−][src]Struct vxdraw::text::TextOptions
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
impl Unpin for TextOptions
impl Sync for TextOptions
impl Send for TextOptions
impl UnwindSafe for TextOptions
impl RefUnwindSafe for TextOptions
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Supports<T> for T
[src]
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,