pub struct LabelBox {
pub w: f32,
pub h: f32,
pub pad: f32,
pub top_inset: f32,
}Expand description
A label’s measured extent, used by LayoutContainer::layout to place it.
w/h are the full background-box size in pixels (the text extent grown by
pad on every side). pad is the horizontal inset from the box’s left edge
to the text origin. top_inset is the vertical inset from the box’s top edge
down to the text origin (the label’s y); it is distinct from pad because
the box hugs the visible glyphs, which sit below the text origin.
Fields§
§w: f32Background-box width in pixels.
h: f32Background-box height in pixels.
pad: f32Horizontal inset from the box’s left edge to the text origin.
top_inset: f32Vertical inset from the box’s top edge down to the text origin.
Trait Implementations§
impl Copy for LabelBox
impl StructuralPartialEq for LabelBox
Auto Trait Implementations§
impl Freeze for LabelBox
impl RefUnwindSafe for LabelBox
impl Send for LabelBox
impl Sync for LabelBox
impl Unpin for LabelBox
impl UnsafeUnpin for LabelBox
impl UnwindSafe for LabelBox
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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