pub struct LayoutOptions {
pub font_size: f64,
pub line_height_factor: f64,
pub alignment: TextAlignment,
pub max_width: Option<f64>,
pub max_height: Option<f64>,
pub first_line_indent: f64,
}Expand description
Options for text layout.
Fields§
§font_size: f64Font size in points.
line_height_factor: f64Line height as a multiple of font size (default 1.2).
alignment: TextAlignmentText alignment.
max_width: Option<f64>Maximum width for text wrapping (in points). None = no wrapping.
max_height: Option<f64>Maximum height (in points). None = unlimited.
first_line_indent: f64First line indent (in points).
Trait Implementations§
Source§impl Clone for LayoutOptions
impl Clone for LayoutOptions
Source§fn clone(&self) -> LayoutOptions
fn clone(&self) -> LayoutOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LayoutOptions
impl Debug for LayoutOptions
Auto Trait Implementations§
impl Freeze for LayoutOptions
impl RefUnwindSafe for LayoutOptions
impl Send for LayoutOptions
impl Sync for LayoutOptions
impl Unpin for LayoutOptions
impl UnsafeUnpin for LayoutOptions
impl UnwindSafe for LayoutOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more