8000 draw the results line thin again, on the zoomed axis by jrnxf · Pull Request #32 · jrnxf/thokr · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10000
34 changes: 17 additions & 17 deletions src/snapshots/thokr__ui__tests__results_screen.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ expression: "draw(&finished(), 80, 24)"
---


60 ▀▄────────────────────────────────────────────────────────────────
▀▄
▀▄
▀▚▖
▝▚▖
50 ──────────▝▚▖─────────────────────────────────────────────────────
▝▀▚▄▄
▀▀▀▄▄▖
▝▀▀▄▄▄▄▄▄▄▄▀▀▀▀▀▀▀▀▚▄▄▖
▝▀▀▀▄▄▄
40 ───────────────────────────────────────────────────▀▀▀▄▄▖─────────
▝▀▀▚▄▄
▀▀▚▄
60 ⠑⢄────────────────────────────────────────────────────────────────
⠑⢄
⠑⢄
⠉⠢⡀
⠈⠢⡀
50 ──────────⠈⠢⡀─────────────────────────────────────────────────────
⠈⠒⠤⢄⣀
⠉⠑⠒⠤⣀⡀
⠈⠉⠒⠢⠤⠤⠤⠔⠒⠒⠒⠒⠒⠒⠊⠉⠉⠉⠑⠒⠤⠤⣀⡀
⠈⠉⠒⠢⠤⢄⣀
40 ────────────────────────────────────────────────────⠉⠑⠢⠤⣀⡀────────
⠈⠑⠒⠤⣀⡀
⠈⠉⠒⠤


30 ──────────────────────────────────────────────────────────────────
Expand All @@ -37,10 +37,10 @@ expression: "draw(&finished(), 80, 24)"
.........bbbbbbbbbbaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb.....
.....................aaaaa......................................................
..........................aaaaaa................................................
...............................aaaaaaaaaaaaaaaaaaaaaaa..........................
.....................................................aaaaaaa....................
.........bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaabbbbbbbbb.....
.................................................................aaaaaa.........
...............................aaaaaaaaaaaaaaaaaaaaaaaa.........................
......................................................aaaaaaa...................
.........bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaabbbbbbbb.....
..................................................................aaaaaa........
.......................................................................aaaa.....
................................................................................
................................................................................
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ expression: "draw(&finished(), 30, 14)"
---


60 ▀▄──────────────
▀▄▄
▀▀▀▀▀▀▚▄▖
40 ─────────────▝▀▄
60 ⠑⢄──────────────
⠈⠢⣀
⠉⠑⠒⠒⠒⠒⠢⠤⣀⡀
40 ─────────────⠈⠑⠢

20 ────────────────
sec 5
Expand All @@ -20,8 +20,8 @@ expression: "draw(&finished(), 30, 14)"
..............................
..............................
.........aabbbbbbbbbbbbbb.....
...........aaa................
..............aaaaaaaaa.......
..........aaa.................
.............aaaaaaaaaa.......
.........bbbbbbbbbbbbbaaa.....
..............................
.........bbbbbbbbbbbbbbbb.....
Expand Down
8 changes: 4 additions & 4 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,13 @@ impl Plot {
buf.set_string(self.area.x - self.gutter, self.area.bottom(), SEC, FAINT);
}

/// The line, one quadrant block char to a 2x2 grid of dots.
/// The line, one braille dot thick: a 2x4 grid of dots to a char.
fn draw_line(&self, coords: &[(f64, f64)], buf: &mut Buffer) {
if self.area.height == 0 || self.area.width == 0 {
return;
}
Canvas::default()
.marker(Marker::Quadrant)
.marker(Marker::Braille)
.x_bounds([self.x0, self.x1])
.y_bounds([self.y.lo, self.y.hi])
.paint(|ctx| {
Expand Down Expand Up @@ -603,7 +603,7 @@ mod tests {
(0..height).any(|y| {
matches!(
buf[(x, y)].symbol().chars().next(),
Some('\u{2580}'..='\u{259F}')
Some('\u{2800}'..='\u{28FF}')
)
})
})
Expand All @@ -623,7 +623,7 @@ mod tests {
assert!(
(plot.area.y..plot.area.bottom()).any(|y| matches!(
buf[(x, y)].symbol().chars().next(),
Some('\u{2580}'..='\u{259F}')
Some('\u{2800}'..='\u{28FF}')
)),
"column {x} has no line"
);
Expand Down
Loading
0