pub struct TextBlock {
pub width: Option<f32>,
pub soft_wrap: bool,
pub align: TextAlign,
}Expand description
What a layer does at compositing, for painting a scene by hand.
The box a block of text is laid out in: how wide it is, whether the text wraps at
that width, and where the lines sit inside it. See Scene::text_block.
Fields§
§width: Option<f32>The box’s width; None leaves the text unbounded, and alignment with it.
soft_wrap: boolWhether the text wraps at width rather than running past it.
align: TextAlignWhere the lines sit inside width.
Trait Implementations§
impl Copy for TextBlock
impl StructuralPartialEq for TextBlock
Auto Trait Implementations§
impl Freeze for TextBlock
impl RefUnwindSafe for TextBlock
impl Send for TextBlock
impl Sync for TextBlock
impl Unpin for TextBlock
impl UnsafeUnpin for TextBlock
impl UnwindSafe for TextBlock
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