1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/// Filled 1/8 from the bottom.
pub const ONE_EIGHTH: char = '▁';
/// Filled 1/4 from the bottom.
pub const ONE_QUARTER: char = '▂';
/// Filled 3/8 from the bottom.
pub const THREE_EIGHTHS: char = '▃';
/// Filled 1/2 from the bottom.
pub const HALF: char = '▄';
/// Filled 5/8 from the bottom.
pub const FIVE_EIGHTHS: char = '▅';
/// Filled 3/4 from the bottom.
pub const THREE_QUARTERS: char = '▆';
/// Filled 7/8 from the bottom.
pub const SEVEN_EIGHTHS: char = '▇';
/// A fully filled cell.
pub const FULL: char = '█';
/// The nine bar levels from empty to full, indexed `0..=8`: a blank cell, then
/// [`ONE_EIGHTH`] through [`FULL`] in order.
///
/// Indexing this directly by `round(fraction * 8.0) as usize` turns a `0.0..=1.0` magnitude
/// into the right glyph for one bar column. Six of these eight are outside CP437 (only ' ' and
/// [`FULL`] are covered); a pixel backend resolving glyphs through a CP437 table draws the other
/// six as its fallback solid block, which erases the ramp's granularity. For a bar that has to
/// stay legible on a CP437-only tileset/sprite path, use [`SHADE_LEVELS`] instead.
pub const NINE_LEVELS: = ;
/// A light shade: 25% coverage, CP437 code point 176 (`U+2591`).
pub const LIGHT_SHADE: char = '░';
/// A medium shade: 50% coverage, CP437 code point 177 (`U+2592`).
pub const MEDIUM_SHADE: char = '▒';
/// A dark shade: 75% coverage, CP437 code point 178 (`U+2593`).
pub const DARK_SHADE: char = '▓';
/// The five bar levels from empty to full, indexed `0..=4`: a blank cell, then [`LIGHT_SHADE`],
/// [`MEDIUM_SHADE`], [`DARK_SHADE`], and [`FULL`] in order.
///
/// Every glyph here is in CP437 (verified against `CP437_TO_UNICODE` in `retroglyph-window`),
/// unlike [`NINE_LEVELS`]: a caller drawing through a pixel backend that resolves glyphs via a
/// CP437 table, or a tileset/sprite backend that can't tint an arbitrary glyph by `Style::fg`,
/// can use this ramp and still get five distinguishable fill levels instead of collapsing to a
/// single fallback block. Index it by `round(fraction * 4.0) as usize` for one bar column.
pub const SHADE_LEVELS: = ;