[][src]Struct nannou::draw::primitive::text::Text

pub struct Text<S = Default> { /* fields omitted */ }

Properties related to drawing the Text primitive.

Methods

impl<S> Text<S>[src]

pub fn new(ctxt: DrawingContext<S>, text: &str) -> Self where
    S: Zero
[src]

Begin drawing some text.

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

The font size to use for the text.

pub fn line_wrap(self, line_wrap: Option<Wrap>) -> Self[src]

Specify whether or not text should be wrapped around some width and how to do so.

The default value is DEFAULT_LINE_WRAP.

pub fn no_line_wrap(self) -> Self[src]

Specify that the Text should not wrap lines around the width.

Shorthand for builder.line_wrap(None).

pub fn wrap_by_word(self) -> Self[src]

Line wrap the Text at the beginning of the first word that exceeds the width.

Shorthand for builder.line_wrap(Some(Wrap::Whitespace)).

pub fn wrap_by_character(self) -> Self[src]

Line wrap the Text at the beginning of the first character that exceeds the width.

Shorthand for builder.line_wrap(Some(Wrap::Character)).

pub fn font(self, font: Font) -> Self[src]

A method for specifying the Font used for displaying the Text.

pub fn justify(self, justify: Justify) -> Self[src]

Describe the end along the x axis to which the text should be aligned.

pub fn left_justify(self) -> Self[src]

Align the text to the left of its bounding Rect's x axis range.

pub fn center_justify(self) -> Self[src]

Align the text to the middle of its bounding Rect's x axis range.

pub fn right_justify(self) -> Self[src]

Align the text to the right of its bounding Rect's x axis range.

pub fn line_spacing(self, spacing: Scalar) -> Self[src]

Specify how much vertical space should separate each line of text.

pub fn y_align(self, align: Align) -> Self[src]

Specify how the whole text should be aligned along the y axis of its bounding rectangle

pub fn align_top(self) -> Self[src]

Align the top edge of the text with the top edge of its bounding rectangle.

pub fn align_middle_y(self) -> Self[src]

Align the middle of the text with the middle of the bounding rect along the y axis..

This is the default behaviour.

pub fn align_bottom(self) -> Self[src]

Align the bottom edge of the text with the bottom edge of its bounding rectangle.

pub fn layout(self, layout: &Layout) -> Self[src]

Set all the parameters via an existing Layout

pub fn with_style(self, style: Style) -> Self[src]

Specify the entire styling for the Text.

Trait Implementations

impl<S: Clone> Clone for Text<S>[src]

impl<S: Debug> Debug for Text<S>[src]

impl<S> From<Text<S>> for Primitive<S>[src]

impl RenderPrimitive for Text<f32>[src]

impl<S> SetColor<f32> for Text<S>[src]

impl<S> SetDimensions<S> for Text<S>[src]

impl<S> SetOrientation<S> for Text<S>[src]

impl<S> SetPosition<S> for Text<S>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Text<S> where
    S: RefUnwindSafe

impl<S> Send for Text<S> where
    S: Send

impl<S> Sync for Text<S> where
    S: Sync

impl<S> Unpin for Text<S> where
    S: Unpin

impl<S> UnwindSafe for Text<S> where
    S: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

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

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

impl<T> SetParameter for T

impl<T> SetParameter for T

impl<S, T> SetSpatial<S> for T where
    T: SetDimensions<S> + SetPosition<S> + SetOrientation<S>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,