pub enum SegmentStyle {
Bold,
Color(Rgb),
BoldColor(Rgb),
Animation(PixelAnimation),
}Expand description
How a single segment should be drawn, layered on top of the frame’s otherwise-normal rendering.
Variants§
Bold
Bold, in the cell’s normal (depth-quantized) color.
Color(Rgb)
A flat, explicit color, normal weight.
BoldColor(Rgb)
A flat, explicit color, bold.
Animation(PixelAnimation)
A PixelAnimation, evaluated in coordinates local to this
segment’s bounding box (x - bounds.x, y - bounds.y) rather than
the whole frame — so e.g. a Ripple animation applied to a small
structure ripples from that structure’s center, not the image’s.
Implementations§
Source§impl SegmentStyle
impl SegmentStyle
Sourcepub fn custom_animation(
f: impl Fn(usize, usize, u64, char) -> TextRgb + Send + Sync + 'static,
) -> Self
pub fn custom_animation( f: impl Fn(usize, usize, u64, char) -> TextRgb + Send + Sync + 'static, ) -> Self
Convenience: wraps a raw per-cell function as an
SegmentStyle::Animation, mirroring PixelAnimation::custom.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for SegmentStyle
impl !UnwindSafe for SegmentStyle
impl Freeze for SegmentStyle
impl Send for SegmentStyle
impl Sync for SegmentStyle
impl Unpin for SegmentStyle
impl UnsafeUnpin for SegmentStyle
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