pub struct TextStyle {Show 18 fields
pub text: String,
pub font: String,
pub size: f32,
pub bold: bool,
pub italic: bool,
pub color: [u8; 4],
pub outline_width: f32,
pub outline_color: [u8; 4],
pub shadow: bool,
pub shadow_color: [u8; 4],
pub shadow_x: f32,
pub shadow_y: f32,
pub shadow_blur: f32,
pub align: u8,
pub line_spacing: f32,
pub letter_spacing: f32,
pub box_color: [u8; 4],
pub box_padding: f32,
}Expand description
Text clip styling. Sizes are in project pixels (at project resolution).
Fields§
§text: String§font: String§size: f32§bold: bool§italic: bool§color: [u8; 4]§outline_width: f32§outline_color: [u8; 4]§shadow: bool§shadow_color: [u8; 4]§shadow_x: f32§shadow_y: f32§shadow_blur: f32§align: u80 = left, 1 = center, 2 = right
line_spacing: f32§letter_spacing: f32§box_color: [u8; 4]Background box behind the text; alpha 0 = none.
box_padding: f32Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextStyle
impl<'de> Deserialize<'de> for TextStyle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnwindSafe for TextStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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