diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2021-07-01 03:24:51 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2021-07-01 03:24:51 +0800 |
commit | 91f6b8ce01c3746049c1162aac8cd073e9191462 (patch) | |
tree | a67ca399f5bd051ea2e9627accb6ef942923d117 | |
parent | f3e31c424f650ae18bcfafb0bd5211f2e68956ae (diff) |
Add more circle art in circle_map
-rw-r--r-- | svgbob/src/map/circle_map.rs | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/svgbob/src/map/circle_map.rs b/svgbob/src/map/circle_map.rs index 855d1fc..51bf38b 100644 --- a/svgbob/src/map/circle_map.rs +++ b/svgbob/src/map/circle_map.rs @@ -246,6 +246,38 @@ lazy_static! { `._ _.' '-.......-' "#, Cell::new(10,5), Cell::new(10,5).m(), 10.0), + + // CIRCLE_21 + // center: 10,5,o radius: 10.5 + (r#" + _.-''''''''-._ + ,' `. + / \ + . . + | | + | | + | | + | | + \ / + `._ _.' + '-........-' + "#, Cell::new(10,5), Cell::new(10,5).o(), 10.5), + + // CIRCLE_22 + // center: 10,5,m radius: 11 + (r#" + _.-'''''''''-._ + ,' `. + / \ + . . + | | + | | + | | + | | + \ / + `._ _.' + '-.........-' + "#, Cell::new(11,5), Cell::new(11,5).m(), 11.0), ]; @@ -258,13 +290,13 @@ lazy_static! { ); /// map of circle spans and their radius - pub static ref DIAMETER_CIRCLE: BTreeMap<i32,Span> =BTreeMap::from_iter( - CIRCLE_MAP.iter().map(|(art, _center_cell, center, radius)|{ + pub static ref DIAMETER_CIRCLE: BTreeMap<i32,(Cell,Span)> =BTreeMap::from_iter( + CIRCLE_MAP.iter().map(|(art, center_cell, center, radius)|{ let cb = CellBuffer::from(*art); let mut spans = cb.group_adjacents(); assert_eq!(spans.len(), 1); let span = spans.remove(0).localize(); - ((*radius * 2.0) as i32, span) + ((*radius * 2.0) as i32, (center_cell.clone(), span)) }) ); |