diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2021-07-10 09:14:09 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2021-07-10 09:14:09 +0800 |
commit | 69532d221e21a240e8cffe130b6163b9eb83533f (patch) | |
tree | 7c8eb942d2e06622322c6adfc20ad3bb9b2e7b46 | |
parent | dabed0b715275859ea245fc18b0fd4fe2a778ce3 (diff) |
Simplify and improve triangle polygon app
-rw-r--r-- | svgbob/TODO.md | 2 | ||||
-rw-r--r-- | svgbob/src/map/unicode_map.rs | 37 |
2 files changed, 18 insertions, 21 deletions
diff --git a/svgbob/TODO.md b/svgbob/TODO.md index 6d3ca81..6637c82 100644 --- a/svgbob/TODO.md +++ b/svgbob/TODO.md @@ -18,4 +18,4 @@ When there is 2 arrows in the middle of a line `---->>-------` or `----<<----` - [ ] Clean the project enforce deny warnings. - [ ] Fix a bug where an escaped text has whitespaces, the whitespaces are gone. -- [ ] Remove support for circle art +- [ ] Revise calculation of Circle and Arc center by basing on the number of chars/width diff --git a/svgbob/src/map/unicode_map.rs b/svgbob/src/map/unicode_map.rs index bec7158..939e8d7 100644 --- a/svgbob/src/map/unicode_map.rs +++ b/svgbob/src/map/unicode_map.rs @@ -165,11 +165,15 @@ lazy_static! { // // | // ▾ - ('▾', vec![polygon(vec![f,j,w], true, vec![ArrowBottom])]), + ('▾', vec![polygon(vec![f,j,w], true, vec![ArrowBottom]), line(c,h)]), + ('▼', vec![polygon(vec![f,j,w], true, vec![ArrowBottom]), line(c,h)]), + // // ▴ // | - ('▴', vec![polygon(vec![p,c,t], true, vec![ArrowTop])]), + ('▴', vec![polygon(vec![p,c,t], true, vec![ArrowTop]),line(r,w)]), + ('▲', vec![polygon(vec![p,c,t], true, vec![ArrowTop]),line(r,w)]), + // // --▸ // @@ -179,6 +183,17 @@ lazy_static! { // ('◂', vec![polygon(vec![j,k,t], true, vec![ArrowLeft])]), + // + // --▶ + // + ('▶', vec![polygon(vec![f,o,p], true, vec![ArrowRight])]), + ('►', vec![polygon(vec![f,o,p], true, vec![ArrowRight])]), + // + // ◀-- + // + ('◀', vec![polygon(vec![j,k,t], true, vec![ArrowLeft])]), + ('◄', vec![polygon(vec![j,k,t], true, vec![ArrowLeft])]), + ('◆', vec![polygon(vec![k,h,o,r,k], true, vec![DiamondBullet])]), ('▪', vec![rect(f,t,true, false)]), @@ -199,17 +214,6 @@ lazy_static! { // 8/8 ('█', vec![rect(a,y,true,false)]), - // / - // --▶ ▶ ▶ - // \ - // - ('▶', vec![polygon(vec![f,o,p], true, vec![ArrowRight, ArrowTopLeft, ArrowBottomLeft])]), - - // \ - // ◀-- ◀ ◀ - // / - // - ('◀', vec![polygon(vec![j,k,t], true, vec![ArrowLeft, ArrowBottomRight, ArrowTopRight])]), // L shape bottom-left box @@ -338,13 +342,6 @@ lazy_static! { // // ∈ ≡ ≤ ≥ ÷ ≠ · × ¬ ↑↓ ∧ ∨ ≈ ± ∃ ∀ ⊃ ⊂ ∪ ∩ ⊖ ⊕ « » - // corners ੮ ᓕ ᓕ ੭ ᜪ フ ᘄ މ - // ረ ᓚ ᘇ د ১ ১ - // ر ◞ ᓗ ﺭ - // ⁔ ⏝ - // - // 𝁼 ⌣ - // メ ]; // sort the fragments first before putting into the btreemap let mut btree = BTreeMap::new(); |