pub struct TextParams {
pub content: String,
pub font_family: String,
pub font_size: f64,
pub font_weight: i64,
pub font_style: TextFontStyle,
pub max_width: f64,
pub position: (f64, f64),
pub color: Paint,
pub alignment_horizontal: TextAlignmentHorizontal,
pub alignment_vertical: TextAlignmentVertical,
}Expand description
Produces a text raster source.
Fields§
§content: StringText content to render.
font_family: StringFont family name.
font_size: f64Font size in pixels.
font_weight: i64Font weight.
font_style: TextFontStyleFont style.
max_width: f64Maximum line width in pixels. Use 0 for automatic width.
position: (f64, f64)Text origin in pixels.
color: PaintText color.
alignment_horizontal: TextAlignmentHorizontalHorizontal text alignment.
alignment_vertical: TextAlignmentVerticalVertical text alignment.
Trait Implementations§
Source§impl Clone for TextParams
impl Clone for TextParams
Source§impl Debug for TextParams
impl Debug for TextParams
Source§impl Default for TextParams
impl Default for TextParams
Source§impl Delegated for TextParams
impl Delegated for TextParams
type Delegate = TextParamsDelegate
fn into_delegate(self) -> Self::Delegate
Auto Trait Implementations§
impl Freeze for TextParams
impl RefUnwindSafe for TextParams
impl Send for TextParams
impl Sync for TextParams
impl Unpin for TextParams
impl UnsafeUnpin for TextParams
impl UnwindSafe for TextParams
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