pub struct TextDrawParams {
pub rect: Rect,
pub text: Rc<AnnotatedString>,
pub color: Color,
pub text_style: TextStyle,
pub font_size: f32,
pub scale: f32,
pub layout_options: TextLayoutOptions,
pub clip: Option<Rect>,
}Expand description
A DrawScope text run, lowered into the vocabulary the text pipeline
already speaks.
The fields line up one-for-one with CompositorScene::push_text in both
backends, so a text primitive joins the same glyph atlas, run cache and
shader the Text composable uses instead of getting a pipeline of its own.
Fields§
§rect: RectLayer-transformed block box. Glyphs are laid out from its top-left; the draw scope already resolved alignment into it.
text: Rc<AnnotatedString>§color: Color§text_style: TextStyle§font_size: f32§scale: f32Uniform layer scale — the factor glyphs are rasterized at.
layout_options: TextLayoutOptions§clip: Option<Rect>Auto Trait Implementations§
impl !RefUnwindSafe for TextDrawParams
impl !Send for TextDrawParams
impl !Sync for TextDrawParams
impl !UnwindSafe for TextDrawParams
impl Freeze for TextDrawParams
impl Unpin for TextDrawParams
impl UnsafeUnpin for TextDrawParams
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