use crate::asciigraph::{Bounds, Cell};
use crate::options::Threshold;
pub(crate) fn render_thresholds(
plot: &mut Vec<Vec<Cell>>,
bounds: &Bounds,
offset: usize,
thresholds: &[Threshold],
) {
for t in thresholds {
let scaled = (t.value * bounds.ratio).round() as isize - bounds.intmin2;
if scaled < 0 || scaled as usize > bounds.rows {
continue;
}
let row = bounds.rows - scaled as usize;
for col in offset..plot[row].len() {
if plot[row][col].text == " " {
plot[row][col].text = t.character.to_string();
plot[row][col].color = t.color;
}
}
}
}