use crate::{
buffer::{
fragment::PolygonTag::{
ArrowBottom, ArrowBottomLeft, ArrowBottomRight, ArrowLeft, ArrowRight, ArrowTop,
ArrowTopLeft, ArrowTopRight, DiamondBullet,
},
Cell, CellGrid,
},
fragment::{arc, broken_line, circle, line, polygon, rect},
Fragment, Property,
Signal::{self, Medium, Strong, Weak},
};
use lazy_static::lazy_static;
use std::{collections::BTreeMap, sync::Arc};
lazy_static! {
/// ```ignore
/// 0 1 2 3 4 B C D
/// 0┌─┬─┬─┬─┐ A┌─┬─┬─┬─┐E
/// 1├─┼─┼─┼─┤ │ │ │ │ │
/// 2├─┼─┼─┼─┤ F├─G─H─I─┤J
/// 3├─┼─┼─┼─┤ │ │ │ │ │
/// 4├─┼─┼─┼─┤ K├─L─M─N─┤O
/// 5├─┼─┼─┼─┤ │ │ │ │ │
/// 6├─┼─┼─┼─┤ P├─Q─R─S─┤T
/// 7├─┼─┼─┼─┤ │ │ │ │ │
/// 8└─┴─┴─┴─┘ U└─┴─┴─┴─┘Y
/// ``` V W X
pub static ref ASCII_PROPERTIES: BTreeMap<char, Property> = {
#![allow(unused)]
let cell = Cell::new(0,0);
let a = CellGrid::a();
let b = CellGrid::b();
let c = CellGrid::c();
let d = CellGrid::d();
let e = CellGrid::e();
let f = CellGrid::f();
let g = CellGrid::g();
let h = CellGrid::h();
let i = CellGrid::i();
let j = CellGrid::j();
let k = CellGrid::k();
let l = CellGrid::l();
let m = CellGrid::m();
let n = CellGrid::n();
let o = CellGrid::o();
let p = CellGrid::p();
let q = CellGrid::q();
let r = CellGrid::r();
let s = CellGrid::s();
let t = CellGrid::t();
let u = CellGrid::u();
let v = CellGrid::v();
let w = CellGrid::w();
let x = CellGrid::x();
let y = CellGrid::y();
/// cellgrids that have no names
/// just name them with coordinate locations
let _01 = CellGrid::point(0, 1);
let _11 = CellGrid::point(1, 1);
let _21 = CellGrid::point(2, 1);
let _31 = CellGrid::point(3, 1);
let _41 = CellGrid::point(4, 1);
let _03 = CellGrid::point(0, 3);
let _13 = CellGrid::point(1, 3);
let _23 = CellGrid::point(2, 3);
let _33 = CellGrid::point(3, 3);
let _43 = CellGrid::point(4, 3);
let _05 = CellGrid::point(0, 5);
let _15 = CellGrid::point(1, 5);
let _25 = CellGrid::point(2, 5);
let _35 = CellGrid::point(3, 5);
let _45 = CellGrid::point(4, 5);
let _07 = CellGrid::point(0, 7);
let _17 = CellGrid::point(1, 7);
let _27 = CellGrid::point(2, 7);
let _37 = CellGrid::point(3, 7);
let _47 = CellGrid::point(4, 7);
let unit1 = Cell::unit(1); // 0.25
let unit2 = Cell::unit(2); // 0.5
let unit3 = Cell::unit(3); // 0.75
let unit4 = Cell::unit(4); // 1.0
let unit5 = Cell::unit(5); // 1.25
let unit6 = Cell::unit(6); // 1.5
let unit7 = Cell::unit(7); // 1.75
let unit8 = Cell::unit(8); // 2.0
// in between 1 and 2
let between1_2 = (unit1 + unit2) / 2.0; // 0.375
/// char, default fragments, conditional fragments
let map: Vec<(
char,
Vec<(Signal, Vec<Fragment>)>,
Arc<dyn Fn(&Property, &Property, &Property, &Property, &Property, &Property, &Property, &Property) -> Vec<(bool, Vec<Fragment>)> +