summaryrefslogtreecommitdiff
path: root/navit/script
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-11-07 13:21:22 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-11-07 13:21:22 +0000
commitfab93045b2a4de8474e0b24a280329d727c5d5e1 (patch)
tree8126aef9e6cd4140cf9d0a482441f587dfbc82a6 /navit/script
parent604de9dadd525602efd045ce7b1f29ea6de957f4 (diff)
downloadnavit-fab93045b2a4de8474e0b24a280329d727c5d5e1.tar.gz
Add:xpm:Script to generate navigation arrows and generated arrows
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1677 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/script')
-rwxr-xr-xnavit/script/gensvg110
1 files changed, 110 insertions, 0 deletions
diff --git a/navit/script/gensvg b/navit/script/gensvg
new file mode 100755
index 000000000..1523201f6
--- /dev/null
+++ b/navit/script/gensvg
@@ -0,0 +1,110 @@
+#! /bin/sh
+
+makearrow()
+{
+cat <<EOT
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ width="64px"
+ height="64px">
+ <g>
+ <path
+ d="M 32,63 L 32,$ya C $xg,$yd $xi,$yc $xe,$yb"
+ style="fill:none;stroke:#${colval};stroke-width:10;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+ <path
+ transform="translate($xe,$yb) scale(3) rotate($angle)"
+ d="M -4,1 L 0,-7 L 4,1 C 2,-1 -2,-1 -4,1"
+ style="fill:#${colval};stroke:#${colval};stroke-linejoin:round"
+ />
+
+ </g>
+</svg>
+EOT
+}
+
+for col in bk wh
+do
+ case $col in
+ bk)
+ colval="000000"
+ ;;
+ wh)
+ colval="ffffff"
+ ;;
+ esac
+ for dir in left right
+ do
+ case $dir in
+ left)
+ angle=360
+ step=-45
+ xa=33.5
+ xb=26
+ xc=16
+ xd=22
+ xf=32
+ xh=28
+ ;;
+ right)
+ angle=0
+ step=45
+ xa=30
+ xb=38
+ xc=48
+ xd=42
+ xf=32
+ xh=36
+ ;;
+ esac
+ for st in 1 2 3
+ do
+ case $st in
+ 1)
+ ya=42
+ yb=20
+ yc=31
+ yd=31
+ xe=$xd
+ xg=$xf
+ xi=$xf
+ ;;
+ 2)
+ ya=25
+ yb=20
+ yc=20
+ yd=22
+ xe=$xd
+ xg=$xf
+ xi=$xh
+ ;;
+ 3)
+ ya=32
+ yb=26
+ yc=16
+ yd=10
+ xe=$xc
+ xg=$xa
+ xi=$xb
+ ;;
+ esac
+ angle=$((angle+step))
+ filename="nav_${dir}_${st}_$col.svg"
+ makearrow >$filename
+ done
+ done
+ filename="nav_straight_$col.svg"
+ xa=32
+ xb=32
+ xc=32
+ xd=32
+ xe=32
+ xf=32
+ xg=32
+ xh=32
+ xi=32
+ angle=0
+ makearrow >$filename
+done
+