#[non_exhaustive]pub struct LayoutParams {
pub text: String,
pub font_size: f64,
pub font_family: String,
pub font_weight: String,
pub font_style: String,
pub letter_spacing: f64,
pub line_height: LineHeight,
pub anchor_x: Anchor,
pub anchor_y: Anchor,
pub text_align: TextAlign,
pub max_width: f64,
}Expand description
The layout parameter block. Default is lib3’s LAYOUT_DEFAULTS
(Text.js:8-20) verbatim, including max_width: Infinity.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: StringThe string to lay out.
font_size: f64Font size, world units.
font_family: StringCanvas path only; the fallback branch never reads it.
font_weight: StringCanvas path only.
font_style: StringCanvas path only.
letter_spacing: f64Extra space added per glyph. See the module’s asymmetric-spacing note.
line_height: LineHeightLine height.
anchor_x: AnchorHorizontal anchor.
anchor_y: AnchorVertical anchor.
text_align: TextAlignMulti-line alignment.
max_width: f64Line-wrap width, world units.
Trait Implementations§
Source§impl Clone for LayoutParams
impl Clone for LayoutParams
Source§impl Debug for LayoutParams
impl Debug for LayoutParams
Source§impl Default for LayoutParams
impl Default for LayoutParams
Source§impl PartialEq for LayoutParams
impl PartialEq for LayoutParams
impl StructuralPartialEq for LayoutParams
Auto Trait Implementations§
impl Freeze for LayoutParams
impl RefUnwindSafe for LayoutParams
impl Send for LayoutParams
impl Sync for LayoutParams
impl Unpin for LayoutParams
impl UnsafeUnpin for LayoutParams
impl UnwindSafe for LayoutParams
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