diff options
author | Jovansonlee Cesar <ivanceras@gmail.com> | 2018-07-30 02:40:13 +0800 |
---|---|---|
committer | Jovansonlee Cesar <ivanceras@gmail.com> | 2018-07-30 02:40:13 +0800 |
commit | d992d59188147294f9088dd00542a0b7ed075133 (patch) | |
tree | 7cfc72593a2d119fddbb93e0b8fdb4d2c85acb33 | |
parent | 9b6d7b581dc4731d4c26da30c3aab01037892564 (diff) |
Using tilde and ! for horizontal and vertical lines respectively
-rw-r--r-- | svgbob/src/enhance.rs | 2 | ||||
-rw-r--r-- | svgbob/src/properties.rs | 32 |
2 files changed, 34 insertions, 0 deletions
diff --git a/svgbob/src/enhance.rs b/svgbob/src/enhance.rs index 3bf0474..dce0fd7 100644 --- a/svgbob/src/enhance.rs +++ b/svgbob/src/enhance.rs @@ -203,6 +203,7 @@ impl<'g> Enhance for FocusChar<'g> { { elm.extend(vec![arc(w, c, 5), line(k, o)]); } + /* // for horizontal dash line // - - else if self.is('-') { @@ -213,6 +214,7 @@ impl<'g> Enhance for FocusChar<'g> { elm.push(dashed_line(o, &left().left().k())); } } + */ (elm, consumed) } diff --git a/svgbob/src/properties.rs b/svgbob/src/properties.rs index 5a5ce23..0242007 100644 --- a/svgbob/src/properties.rs +++ b/svgbob/src/properties.rs @@ -257,6 +257,18 @@ impl Properties for char { intended_behavior: vec![], }) } + ///////////////////////////// + // + // ~ tilde will be hidden lines + // + ////////////////////////////// + else if self.is('~'){ + Some(Characteristic { + properties: vec![(K, Strong, vec![dashed_line(k, o)]), (O, Strong, vec![dashed_line(k, o)])], + intensify: vec![], + intended_behavior: vec![], + }) + } /////////////////////////////// // // = equal sign @@ -1495,6 +1507,11 @@ impl Properties for char { ], }) } + ////////////////////////////// + // + // : colon for vertical hidden line + // + ////////////////////////////// else if self.is(':'){ Some(Characteristic{ intensify: vec![], @@ -1505,6 +1522,21 @@ impl Properties for char { ], }) } + ////////////////////////////// + // + // ! exclamation can also be for vertical hidden line + // + ////////////////////////////// + else if self.is('!'){ + Some(Characteristic{ + intensify: vec![], + intended_behavior: vec![], + properties: vec![ + (C, Strong, vec![dashed_line(c,w)]), + (W, Strong, vec![dashed_line(c,w)]), + ], + }) + } // if nothing matches, try checking in box drawing else { let (blocks, fragments) = box_drawing::box_drawing(&self); |