summaryrefslogtreecommitdiffstats
path: root/svgbob/src/map/ascii_map.rs
diff options
context:
space:
mode:
Diffstat (limited to 'svgbob/src/map/ascii_map.rs')
-rw-r--r--svgbob/src/map/ascii_map.rs58
1 files changed, 29 insertions, 29 deletions
diff --git a/svgbob/src/map/ascii_map.rs b/svgbob/src/map/ascii_map.rs
index 6576ce4..fad9d56 100644
--- a/svgbob/src/map/ascii_map.rs
+++ b/svgbob/src/map/ascii_map.rs
@@ -4,7 +4,7 @@ use crate::{
ArrowBottom, ArrowBottomLeft, ArrowBottomRight, ArrowLeft, ArrowRight, ArrowTop,
ArrowTopLeft, ArrowTopRight, DiamondBullet,
},
- Cell, CellGrid,
+ Cell, CellGrid, Settings,
},
fragment::{arc, broken_line, circle, line, polygon, rect},
Fragment, Property,
@@ -98,7 +98,7 @@ lazy_static! {
let map: Vec<(
char,
Vec<(Signal, Vec<Fragment>)>,
- Arc<dyn Fn(&Property, &Property, &Property, &Property, &Property, &Property, &Property, &Property) -> Vec<(bool, Vec<Fragment>)> + Sync + Send >,
+ Arc<dyn Fn(&Settings, &Property, &Property, &Property, &Property, &Property, &Property, &Property, &Property) -> Vec<(bool, Vec<Fragment>)> + Sync + Send >,
)> = vec![
///////////////
// dash -
@@ -109,7 +109,7 @@ lazy_static! {
(Strong, vec![line(k, o)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![line(k, o)]),
]
@@ -125,7 +125,7 @@ lazy_static! {
(Strong, vec![broken_line(k, o)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![broken_line(k, o)]),
]
@@ -141,7 +141,7 @@ lazy_static! {
(Strong, vec![line(c,w)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(!bottom_left.is('/') && !bottom_right.is('\\') && !top_left.is('\\') && !top_right.is('/'), vec![line(c,w)]),
// _
@@ -180,7 +180,7 @@ lazy_static! {
(Strong, vec![broken_line(c,w)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(top.line_strongly_overlap(r,w) || bottom.line_strongly_overlap(c,h), vec![broken_line(c,w)]),
]
@@ -196,7 +196,7 @@ lazy_static! {
(Strong, vec![broken_line(c,w)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(top.line_strongly_overlap(r,w) || bottom.line_strongly_overlap(c,h), vec![broken_line(c,w)]),
]
@@ -213,7 +213,7 @@ lazy_static! {
(Weak, vec![line(a,y), line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// |
// +
@@ -256,7 +256,7 @@ lazy_static! {
(Strong, vec![line(a,y), line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// \ X
// X \
@@ -279,7 +279,7 @@ lazy_static! {
(Weak, vec![line(a,y), line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![circle(m,unit2, true)]),
]
@@ -298,7 +298,7 @@ lazy_static! {
(Weak, vec![line(a,y), line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(top.line_overlap(r,w) || bottom.line_overlap(c,h)
|| left.line_overlap(n,o) || right.line_overlap(k,l),
@@ -323,7 +323,7 @@ lazy_static! {
(Weak, vec![line(a,y), line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// must have at least one connection
// \|/
@@ -350,7 +350,7 @@ lazy_static! {
(Weak, vec![line(a,y), line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// must have at least one connection
// \|/
@@ -373,7 +373,7 @@ lazy_static! {
(Strong, vec![line(u, y)])
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![line(u,y)]),
// /_
@@ -395,7 +395,7 @@ lazy_static! {
(Weak, vec![line(m,o)]), // connects right
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// .
// |
@@ -482,7 +482,7 @@ lazy_static! {
(Weak, vec![line(m,o)]), // connects right
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// ,-
// |
@@ -507,7 +507,7 @@ lazy_static! {
(Weak, vec![line(m,o)]), // connects right
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// |
// '
@@ -576,7 +576,7 @@ lazy_static! {
(Weak, vec![line(m,o)]), // connects right
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// |
// ’-
@@ -633,7 +633,7 @@ lazy_static! {
(Weak, vec![line(m,o)]), // connects right
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// |
// `-
@@ -668,7 +668,7 @@ lazy_static! {
(Strong, vec![line(u,e)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![line(u,e)]),
]}
@@ -683,7 +683,7 @@ lazy_static! {
(Strong, vec![line(a,y)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(!bottom.is('|'), vec![line(a,y)]),
/*
@@ -708,7 +708,7 @@ lazy_static! {
(Medium, vec![arc(e,y, unit8)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![arc(e,y,unit8)]),
]
@@ -723,7 +723,7 @@ lazy_static! {
(Medium, vec![arc(u,a, unit8)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(!top.is('|') && !bottom.is('|'), vec![arc(u,a,unit8)]),
// |
@@ -746,7 +746,7 @@ lazy_static! {
(Weak, vec![line(m,w)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// |
// V
@@ -779,7 +779,7 @@ lazy_static! {
(Medium, vec![polygon(vec![f,j,w], true, vec![ArrowBottom])]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// |
// v
@@ -811,7 +811,7 @@ lazy_static! {
(Medium, vec![polygon(vec![p,c,t], true, vec![ArrowTop])]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// ^
// |
@@ -840,7 +840,7 @@ lazy_static! {
(Medium, vec![polygon(vec![f,o,p], true, vec![ArrowRight])]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// --->
(left.line_overlap(n,o), vec![polygon(vec![f,o,p], true, vec![ArrowRight])]),
@@ -865,7 +865,7 @@ lazy_static! {
(Medium, vec![polygon(vec![j,k,t], true, vec![ArrowLeft])]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
// <--
(right.line_overlap(k,l), vec![polygon(vec![j,k,t], true, vec![ArrowLeft])]),
@@ -890,7 +890,7 @@ lazy_static! {
(Medium, vec![line(_03, _43), line(_05, _45)]),
],
Arc::new(
- move|top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
+ move|settings, top_left, top, top_right, left, right, bottom_left, bottom, bottom_right| {
vec![
(true, vec![line(_03, _43), line(_05, _45)]),
]