pub struct AlignmentLines { /* private fields */ }Expand description
Text baselines measured down from a layout’s top edge.
Containers inherit the smallest first baseline and largest last baseline of their placed children. A missing line remains unspecified through translation.
Implementations§
Source§impl AlignmentLines
impl AlignmentLines
Sourcepub fn new(first: Option<f32>, last: Option<f32>) -> Self
pub fn new(first: Option<f32>, last: Option<f32>) -> Self
Creates alignment lines. Non-finite coordinates are treated as unspecified.
Sourcepub fn first_baseline(self) -> Option<f32>
pub fn first_baseline(self) -> Option<f32>
The first drawn text baseline, when this layout provides one.
Sourcepub fn last_baseline(self) -> Option<f32>
pub fn last_baseline(self) -> Option<f32>
The last drawn text baseline, when this layout provides one.
Sourcepub fn translated(self, y: f32) -> Self
pub fn translated(self, y: f32) -> Self
Translates specified lines by a child’s vertical placement.
Sourcepub fn merge(&mut self, other: Self)
pub fn merge(&mut self, other: Self)
Inherits the first and last lines of another placed child.
Sourcepub fn with_overrides(self, explicit: Self) -> Self
pub fn with_overrides(self, explicit: Self) -> Self
Replaces inherited lines with the lines explicitly provided by a layout.
Trait Implementations§
Source§impl Clone for AlignmentLines
impl Clone for AlignmentLines
impl Copy for AlignmentLines
Source§impl Debug for AlignmentLines
impl Debug for AlignmentLines
Source§impl Default for AlignmentLines
impl Default for AlignmentLines
Auto Trait Implementations§
impl Freeze for AlignmentLines
impl RefUnwindSafe for AlignmentLines
impl Send for AlignmentLines
impl Sync for AlignmentLines
impl Unpin for AlignmentLines
impl UnsafeUnpin for AlignmentLines
impl UnwindSafe for AlignmentLines
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