pub enum TextEffect {
Show 14 variants
Bold,
Italic,
Underline,
Strikethrough,
Outline {
color: [u8; 4],
width_x: f32,
width_y: f32,
},
Shadow {
color: [u8; 4],
x_offset: f32,
y_offset: f32,
},
Blur {
radius: f32,
},
EdgeBlur {
radius: f32,
},
Karaoke {
progress: f32,
style: u8,
secondary: [u8; 4],
},
Rotation {
x: f32,
y: f32,
z: f32,
origin: Option<(f32, f32)>,
},
Shear {
x: f32,
y: f32,
},
Scale {
x: f32,
y: f32,
},
Clip {
x1: f32,
y1: f32,
x2: f32,
y2: f32,
inverse: bool,
},
OpaqueBox {
color: [u8; 4],
padding_x: f32,
padding_y: f32,
},
}Expand description
Text effect enumeration
Variants§
Bold
Bold text
Italic
Italic text
Underline
Underline
Strikethrough
Strikethrough
Outline
Outline with color and per-axis width (\bord/\xbord/\ybord). For the
common symmetric case width_x == width_y.
Shadow
Shadow with color and offset
Blur
Blur effect
EdgeBlur
Edge blur effect (only blurs outline/edges)
Karaoke
Karaoke effect. secondary is the not-yet-sung (secondary) colour;
the sung colour is the layer’s primary color.
Rotation
3D rotation (in degrees). origin, when set, is the rotation centre in
screen-space pixels (\org); otherwise the text’s own centre is used.
Shear
Shear/skew transformation
Scale
Scale transformation
Clip
Clip region
OpaqueBox
Opaque box behind the text (BorderStyle: 3), drawn in the outline
colour with per-axis padding around the glyph bounds.
Trait Implementations§
Source§impl Clone for TextEffect
impl Clone for TextEffect
Source§fn clone(&self) -> TextEffect
fn clone(&self) -> TextEffect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextEffect
impl RefUnwindSafe for TextEffect
impl Send for TextEffect
impl Sync for TextEffect
impl Unpin for TextEffect
impl UnsafeUnpin for TextEffect
impl UnwindSafe for TextEffect
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,
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