diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2020-10-30 16:51:07 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2020-10-30 16:51:07 +0800 |
commit | 945e6f47ea9e0de6a228213525a129ec8a637cf2 (patch) | |
tree | 553209411ec781946954a05e0971f2f60ea4d958 | |
parent | 2ff313c140c1a3e85dd6e55528fd70e6c7ecb2e4 (diff) |
Add more TODO items
-rw-r--r-- | svgbob/TODO.md | 1 | ||||
-rw-r--r-- | svgbob/src/map/circle_map.rs | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/svgbob/TODO.md b/svgbob/TODO.md index 5907a96..0e8ce6b 100644 --- a/svgbob/TODO.md +++ b/svgbob/TODO.md @@ -12,3 +12,4 @@ - [x] Add enhance circle, detect circles then enhance it. - [ ] Add test cases - [ ] Re-implement the escape string with double quotes. +- [ ] Use perfect hashmap [phf](https://crates.io/crates/phf) to efficiently build the maps(unicode_map, circle_map, ascii_map) at compile time. diff --git a/svgbob/src/map/circle_map.rs b/svgbob/src/map/circle_map.rs index b2388e2..5367007 100644 --- a/svgbob/src/map/circle_map.rs +++ b/svgbob/src/map/circle_map.rs @@ -283,6 +283,9 @@ lazy_static! { let cb = CellBuffer::from(*art); let mut spans = cb.group_adjacents(); assert_eq!(spans.len(), 1); + //TODO: span localize here affects the center of the arc, + //need to use the exact center used in the circle here + //Need to fix the calculation here involving the span let span = spans.remove(0).localize(); let (tl_bounds, br_bounds) = span.bounds().expect("There should be bounds"); |