pub struct TextRun {
pub pos: PointPx,
pub text: Span,
pub style: FontStyleRef,
pub color: Rgba,
pub align: TextAlign,
pub bg: Option<LabelBg>,
}Expand description
One line of text. The characters are FramePools::text[text.range()].
pos.y is the vertical center of the line box (ascent to descent).
Fields§
§pos: PointPxAnchor point; see TextAlign.
text: SpanByte span in FramePools::text.
style: FontStyleRefFont and size.
color: RgbaText color.
align: TextAlignHorizontal alignment.
bg: Option<LabelBg>Optional background box.
Trait Implementations§
impl Copy for TextRun
impl StructuralPartialEq for TextRun
Auto Trait Implementations§
impl Forget for TextRun
impl Freeze for TextRun
impl Move for TextRun
impl RefUnwindSafe for TextRun
impl Send for TextRun
impl Sync for TextRun
impl Unpin for TextRun
impl UnsafeUnpin for TextRun
impl UnwindSafe for TextRun
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