[][src]Type Definition nannou::draw::primitive::text::DrawingText

type DrawingText<'a, S = Default> = Drawing<'a, Text<S>, S>;

The drawing context for the Text primitive.

Methods

impl<'a, S> DrawingText<'a, S> where
    S: BaseFloat
[src]

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

The font size to use for the text.

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

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

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

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

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

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

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

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

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

Build the Text with the given Style.

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_text(self, align: Align) -> Self[src]

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

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

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

pub fn align_text_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_text_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