Struct conrod::TextStyle
[−]
[src]
pub struct TextStyle { pub maybe_font_size: Option<FontSize>, pub maybe_color: Option<Color>, pub maybe_wrap: Option<Option<Wrap>>, pub maybe_line_spacing: Option<Scalar>, pub maybe_text_align: Option<Align>, }
The styling for a Text's graphics.
Fields
maybe_font_size: Option<FontSize>
The font size for the Text.
maybe_color: Option<Color>
The color of the Text.
maybe_wrap: Option<Option<Wrap>>
Whether or not the text should wrap around the width.
maybe_line_spacing: Option<Scalar>
The spacing between consecutive lines.
maybe_text_align: Option<Align>
Alignment of the text along the x axis.
Methods
impl Style
[src]
fn new() -> Style
Construct the default Style.
fn color(&self, theme: &Theme) -> Color
Get the Color for an Element.
fn font_size(&self, theme: &Theme) -> FontSize
Get the text font size for an Element.
fn wrap(&self, theme: &Theme) -> Option<Wrap>
Get whether or not the text should wrap around if the length exceeds the width.
fn line_spacing(&self, theme: &Theme) -> Scalar
Get the length of the separating space between consecutive lines of text.
fn text_align(&self, theme: &Theme) -> Align
Get the text alignment along the Text's bounding Rect's x axis.
Trait Implementations
impl PartialEq for Style
[src]
fn eq(&self, __arg_0: &Style) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Style) -> bool
This method tests for !=
.
impl Debug for Style
[src]
impl Clone for Style
[src]
fn clone(&self) -> Style
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more