summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJovansonlee Cesar <ivanceras@gmail.com>2018-08-02 19:14:36 +0800
committerJovansonlee Cesar <ivanceras@gmail.com>2018-08-02 19:14:36 +0800
commit3c8d2f9caffb504e28bfc000191cedef3fe1ae8a (patch)
tree8de41ad8938a027e20d323000c3da918c21463c5
parentbbbf517669854b92c4548b9ac8ef94a59e0aa45e (diff)
Support for geometric arrow shapes to form as arrow heads on certain direction
-rw-r--r--svgbob/src/properties.rs115
1 files changed, 111 insertions, 4 deletions
diff --git a/svgbob/src/properties.rs b/svgbob/src/properties.rs
index 23a4aef..05333b4 100644
--- a/svgbob/src/properties.rs
+++ b/svgbob/src/properties.rs
@@ -1308,7 +1308,7 @@ impl Properties for char {
// < less than sign, arrow left
//
///////////////////////////////
- else if self.is('<') {
+ else if self.any("<◀◄") {
Some(Characteristic {
is_static: false,
intensify: vec![
@@ -1361,7 +1361,7 @@ impl Properties for char {
// > greater than sign, arrow right
//
////////////////////////////
- else if self.is('>') {
+ else if self.any(">▶►") {
Some(Characteristic {
is_static: false,
intensify: vec![
@@ -1414,7 +1414,7 @@ impl Properties for char {
// ^ carret
//
///////////////////////
- else if self.is('^') {
+ else if self.any("^▲▴") {
Some(Characteristic {
is_static: false,
properties: vec![
@@ -1501,7 +1501,7 @@ impl Properties for char {
// letter v V
//
//////////////////////////
- else if self.any("vV") {
+ else if self.any("vV▼▾") {
Some(Characteristic {
is_static: false,
properties: vec![
@@ -1545,6 +1545,113 @@ impl Properties for char {
],
})
}
+ // ◤
+ else if self.is('◤'){
+ Some(Characteristic {
+ is_static: false,
+ properties: vec![
+ (Y, Medium, vec![arrow_line(y, g)]),
+ ],
+ intensify: vec![
+ // ◤
+ // \
+ (
+ Y,
+ Condition {
+ loc: bottom_right(),
+ can: ConnectTo(A, Strong),
+ },
+ ),
+ ],
+ intended_behavior: vec![
+ // ◤
+ // \
+ (vec![Y], vec![arrow_line(y, a)]),
+ ],
+ })
+ }
+ // ◥
+ else if self.is('◥') {
+ Some(Characteristic {
+ is_static: false,
+ properties: vec![
+ (U, Medium, vec![arrow_line(u, i)]),
+ ],
+ intensify: vec![
+ // ◥
+ // /
+ (
+ U,
+ Condition {
+ loc: bottom_left(),
+ can: ConnectTo(E, Strong),
+ },
+ ),
+ ],
+ intended_behavior: vec![
+ // ◥
+ // /
+ (vec![U], vec![arrow_line(u,e)]),
+ ],
+ })
+ }
+ // Specific arrow heads
+ // ◢
+ else if self.is('◢'){
+ Some(Characteristic {
+ is_static: false,
+ properties: vec![
+ (A, Medium, vec![arrow_line(a, s)]),
+ ],
+ intended_behavior: vec![
+ // \
+ // ◢
+ (vec![A], vec![arrow_line(a,s)]),
+ ],
+ intensify: vec![
+
+ // \
+ // ◢
+ (
+ A,
+ Condition {
+ loc: top_left(),
+ can: ConnectTo(Y, Strong),
+ },
+ ),
+ ]
+
+ })
+ }
+ // /
+ // ◣
+ else if self.is('◣'){
+ Some(Characteristic {
+ is_static: false,
+ properties: vec![
+ (E, Medium, vec![arrow_line(e, q)]),
+ ],
+ intensify: vec![
+
+ // /
+ // ◣
+ (
+ E,
+ Condition {
+ loc: top_right(),
+ can: ConnectTo(U, Strong),
+ },
+ ),
+ ],
+
+ intended_behavior: vec![
+ // /
+ // ◣
+ (vec![E], vec![line(m, e)]),
+ ],
+ })
+
+ }
///////////////////////////
//
// ( open parenthesis