pub enum ShadowStyle {
HalfBlock,
Braille {
density: f32,
},
MediumShade,
Solid,
Gradient {
layers: u8,
},
}Expand description
The rendering style for shadows.
Different styles offer tradeoffs between visual quality and terminal compatibility.
Variants§
HalfBlock
Half-block characters (▐▄▌▀) for soft sub-cell shadows.
This is the default style and provides the best visual quality on most terminals. Uses foreground/background color blending for sub-cell precision.
Braille
Braille patterns (⣿) for dithered/density-based shadows.
Provides a 2x4 subpixel grid per cell for fine-grained density control. May not render correctly on all terminal fonts.
MediumShade
Medium shade character cells (▒) for textured full-cell shadows.
Uses foreground color with a fixed medium-density shade glyph. More visually pronounced than braille while preserving texture.
Solid
Solid color cells (space with background color).
The simplest shadow style - fills cells with solid background color. Maximum compatibility but no sub-cell precision.
Gradient
Multi-layer gradient shadow with decreasing intensity.
Creates a softer shadow effect by rendering multiple layers with progressively lighter colors.
Implementations§
Source§impl ShadowStyle
impl ShadowStyle
pub fn schema() -> SchemaNode
Source§impl ShadowStyle
impl ShadowStyle
Sourcepub fn braille(density: f32) -> Self
pub fn braille(density: f32) -> Self
Create a braille shadow with the specified density.
§Arguments
density- Fill density from 0.0 (empty) to 1.0 (fully filled). Values are clamped to this range.
Sourcepub fn gradient(layers: u8) -> Self
pub fn gradient(layers: u8) -> Self
Create a gradient shadow with the specified number of layers.
§Arguments
layers- Number of gradient layers (clamped to 1-4).
Sourcepub fn terse_description(&self) -> &'static str
pub fn terse_description(&self) -> &'static str
Returns a brief human-readable description of what this style does.
Sourcepub fn key_parameters(&self) -> Vec<(&'static str, String)>
pub fn key_parameters(&self) -> Vec<(&'static str, String)>
Returns key parameters of this style for documentation purposes.
Trait Implementations§
Source§impl Clone for ShadowStyle
impl Clone for ShadowStyle
Source§fn clone(&self) -> ShadowStyle
fn clone(&self) -> ShadowStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more