<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/alex-2012.css" ?>
<rss version="2.0"
    xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:cc="http://web.resource.org/cc/"
    xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<title>Alex Schroeder: SVG</title>
<link>http://alexschroeder.ch/wiki/Diary</link>
<atom:link href="http://www.google.com/profiles/kensanata" rel="me" type="text/html" />
<atom:link href="http://alexschroeder.ch/wiki?action=rss;full=1" rel="self" type="application/rss+xml" />
<description>The Homepage of Alex Schroeder.</description>
<pubDate>Mon, 20 May 2013 10:14:53 GMT</pubDate>
<lastBuildDate>Mon, 20 May 2013 10:14:53 GMT</lastBuildDate>
<generator>Oddmuse</generator>
<copyright>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation.</copyright>
<cc:license>http://www.gnu.org/copyleft/fdl.html</cc:license>
<image>
<url>http://alexschroeder.ch/pics/alex.png</url>
<title>Alex Schroeder: SVG</title>
<link>http://alexschroeder.ch/wiki</link>
</image>

<item>
<title>Text Mapper With Lines</title>
<link>http://alexschroeder.ch/wiki/2013-03-04_Text_Mapper_With_Lines</link>
<guid>http://alexschroeder.ch/wiki/2013-03-04_Text_Mapper_With_Lines</guid>
<description>&lt;p&gt;SVG Mapper now knows how to draw lines. These lines try to flow from hex to hex&amp;#x2026;&lt;/p&gt;&lt;p&gt;Example input:&lt;/p&gt;&lt;pre class="real"&gt;2114 hill
2115 hill
2213 forest
2214 forest "Delan"
2215 hill
2314 forest
2315 forest
2414 hill "Forest Bight Fortress"
2415 forest
2515 forest "Boghra Little"

2214-2615 river
river path attributes fill-opacity="0" stroke="black" stroke-width="5"

include http://alexschroeder.ch/contrib/default.txt&lt;/pre&gt;&lt;p&gt;Result:&lt;/p&gt;&lt;p&gt;&lt;a class="image outside" href="http://alexschroeder.ch/text-mapper?map=2114+hill%0D%0A2115+hill%0D%0A2213+forest%0D%0A2214+forest+%22Delan%22%0D%0A2215+hill%0D%0A2314+forest%0D%0A2315+forest%0D%0A2414+hill+%22Forest+Bight+Fortress%22%0D%0A2415+forest%0D%0A2515+forest+%22Boghra+Little%22%0D%0A%0D%0A2214-2615+river%0D%0Ariver+path+attributes+fill-opacity%3D%220%22+stroke%3D%22black%22+stroke-width%3D%225%22%0D%0A%0D%0Ainclude+http%3A%2F%2Falexschroeder.ch%2Fcontrib%2Fdefault.txt"&gt;&lt;img class="upload" title="Dangerous Forest" src="http://alexschroeder.ch/text-mapper?map=2114+hill%0D%0A2115+hill%0D%0A2213+forest%0D%0A2214+forest+%22Delan%22%0D%0A2215+hill%0D%0A2314+forest%0D%0A2315+forest%0D%0A2414+hill+%22Forest+Bight+Fortress%22%0D%0A2415+forest%0D%0A2515+forest+%22Boghra+Little%22%0D%0A%0D%0A2214-2615+river%0D%0Ariver+path+attributes+fill-opacity%3D%220%22+stroke%3D%22black%22+stroke-width%3D%225%22%0D%0A%0D%0Ainclude+http%3A%2F%2Falexschroeder.ch%2Fcontrib%2Fdefault.txt" alt="Dangerous Forest" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I think that I&amp;#x2019;m not quite understanding how the viewBox is supposed to work. But anyway: these lines can be used for roads, rivers, borders, cliffs, and the like. If they&amp;#x2019;re very straight, they don&amp;#x2019;t look too good. There&amp;#x2019;s no random waviness. One feature I definitely have to add is providing more intermediary points such that the user can guide rivers around the hills or to allow rivers to merge.&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Maps"&gt;Maps&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Maps"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Text%20Mapper"&gt;Text Mapper&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Text%20Mapper"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Mon, 04 Mar 2013 00:06:34 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2013-03-04_Text_Mapper_With_Lines</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2013-03-04_Text_Mapper_With_Lines</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2013-03-04_Text_Mapper_With_Lines</wiki:diff>
<category>SVG</category>
<category>Maps</category>
<category>Text Mapper</category>
</item>

<item>
<title>Text Mapper Progress</title>
<link>http://alexschroeder.ch/wiki/2013-03-01_Text_Mapper_Progress</link>
<guid>http://alexschroeder.ch/wiki/2013-03-01_Text_Mapper_Progress</guid>
<description>&lt;p&gt;I&amp;#x2019;m a big fan of the &lt;a class="local" href="http://alexschroeder.ch/wiki/2012-05-15_The_Forgotten_Depths"&gt;Forgotten Depths&lt;/a&gt;. I wanted to use its map as the goal for my &lt;a class="url http outside" href="http://alexschroeder.ch/wiki/2013-02-26_Text_Mapper"&gt;Text Mapper&lt;/a&gt;. As the mapper now allows the inclusion of other files, I&amp;#x2019;ve saved my library of colors and icons as &lt;a class="url http outside" href="http://alexschroeder.ch/contrib/default.txt"&gt;default.txt&lt;/a&gt; and I&amp;#x2019;ve saved the map as &lt;a class="url http outside" href="http://alexschroeder.ch/contrib/forgotten-depths.txt"&gt;forgotten-depths.txt&lt;/a&gt;. That&amp;#x2019;s why all you need to do now is include the map:&lt;/p&gt;&lt;p&gt;&lt;a class="image outside" href="http://alexschroeder.ch/text-mapper?map=include+http%3A%2F%2Falexschroeder.ch%2Fcontrib%2Fforgotten-depths.txt%0D%0A%0D%0A"&gt;&lt;img class="upload" title="Forgotten Depths SVG" src="http://alexschroeder.ch/text-mapper?map=include+http%3A%2F%2Falexschroeder.ch%2Fcontrib%2Fforgotten-depths.txt%0D%0A%0D%0A" alt="Forgotten Depths SVG" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you see white hexes, then I haven&amp;#x2019;t added any definitions for them, yet.&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Software"&gt;Software&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Software"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Maps"&gt;Maps&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Maps"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Text%20Mapper"&gt;Text Mapper&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Text%20Mapper"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Fri, 01 Mar 2013 10:28:25 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2013-03-01_Text_Mapper_Progress</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2013-03-01_Text_Mapper_Progress</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2013-03-01_Text_Mapper_Progress</wiki:diff>
<category>SVG</category>
<category>Software</category>
<category>Maps</category>
<category>Text Mapper</category>
</item>

<item>
<title>SVG Filters</title>
<link>http://alexschroeder.ch/wiki/2013-02-27_SVG_Filters</link>
<guid>http://alexschroeder.ch/wiki/2013-02-27_SVG_Filters</guid>
<description>&lt;p&gt;I need help with &lt;a class="url http outside" href="http://www.w3.org/TR/SVG/filters.html"&gt;SVG filters&lt;/a&gt;. This question is &lt;a class="url http outside" href="http://stackoverflow.com/questions/15130850/svg-filter-fegaussianblur-needs-boosting"&gt;also on StackOverflow&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This is what I want to achieve:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/kensanata/8511938807/" class="url http"&gt;&lt;img class="url http" src="https://farm9.staticflickr.com/8507/8511938807_5a793d726a.jpg" alt="https://farm9.staticflickr.com/8507/8511938807_5a793d726a.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Previously, I&amp;#x2019;d duplicate the text element, make the background white, and blur it:&lt;/p&gt;&lt;pre class="real"&gt;  &amp;lt;defs&amp;gt;
    &amp;lt;filter id="label-glow"&amp;gt;
      &amp;lt;feGaussianBlur stdDeviation="1" /&amp;gt;
    &amp;lt;/filter&amp;gt;
  &amp;lt;/defs&amp;gt;
  &amp;lt;text stroke="white" stroke-width="5" filter="url(#label-glow)"&amp;gt;Harald's Repose&amp;lt;/text&amp;gt;
  &amp;lt;text&amp;gt;Harald's Repose&amp;lt;/text&amp;gt;&lt;/pre&gt;&lt;p&gt;I&amp;#x2019;m trying not to duplicate the text element. Here&amp;#x2019;s how to do it using filters:&lt;/p&gt;&lt;pre class="real"&gt;  &amp;lt;defs&amp;gt;
    &amp;lt;filter id="label-glow"&amp;gt;
      &amp;lt;feFlood flood-color="white"/&amp;gt;
      &amp;lt;feComposite in2="SourceGraphic" operator="in"/&amp;gt;
      &amp;lt;feGaussianBlur stdDeviation="2"/&amp;gt;
      &amp;lt;feComposite operator="over"/&amp;gt;
      &amp;lt;feComposite operator="over"/&amp;gt;
      &amp;lt;feComposite operator="over"/&amp;gt;
      &amp;lt;feComposite operator="over"/&amp;gt;
      &amp;lt;feComposite in="SourceGraphic"/&amp;gt;
    &amp;lt;/filter&amp;gt;
  &amp;lt;/defs&amp;gt;
  &amp;lt;text filter="url(#label-glow)"&amp;gt;Harald's Repose&amp;lt;/text&amp;gt;&lt;/pre&gt;&lt;p&gt;Unfortunately the output of the Gaussian blur is very weak which is why I need to overlay it multiple times. What am I missing?&lt;/p&gt;&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;: As I&amp;#x2019;ve been experimenting with it, I&amp;#x2019;ve decided to drop filters altogether. When using Firefox and printing the map to PDF, the filters all result in bitmap elements that don&amp;#x2019;t scale well.&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Software"&gt;Software&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Software"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Wed, 27 Feb 2013 22:29:03 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2013-02-27_SVG_Filters</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2013-02-27_SVG_Filters</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2013-02-27_SVG_Filters</wiki:diff>
<category>SVG</category>
<category>Software</category>
</item>

<item>
<title>New Text Mapper Shapes</title>
<link>http://alexschroeder.ch/wiki/2013-02-27_New_Text_Mapper_Shapes</link>
<guid>http://alexschroeder.ch/wiki/2013-02-27_New_Text_Mapper_Shapes</guid>
<description>&lt;p&gt;How to create new shapes for &lt;a class="local" href="http://alexschroeder.ch/wiki/2013-02-26_Text_Mapper"&gt;Text Mapper&lt;/a&gt;?&lt;/p&gt;&lt;p&gt;First, start with an empty SVG file:&lt;/p&gt;&lt;pre class="real"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&amp;gt;
&amp;lt;svg xmlns="http://www.w3.org/2000/svg"
     height="200px"
     width="200px"&amp;gt;
&amp;lt;/svg&amp;gt;&lt;/pre&gt;&lt;p&gt;I like to draw stuff using the &lt;em style="font-style: normal; letter-spacing: 0.125em; padding-left: 0.125em;"&gt;calligraphy&lt;/em&gt; tool (&lt;code&gt;c&lt;/code&gt;). I usually &lt;em style="font-style: normal; letter-spacing: 0.125em; padding-left: 0.125em;"&gt;simplify&lt;/em&gt; the nodes a lot (&lt;code&gt;Ctrl+L&lt;/code&gt;), &lt;em style="font-style: normal; letter-spacing: 0.125em; padding-left: 0.125em;"&gt;unify&lt;/em&gt; the shapes (&lt;code&gt;Ctrl++&lt;/code&gt;), edit the nodes by hand (&lt;code&gt;n&lt;/code&gt;) until you&amp;#x2019;re happy with the fewest number of nodes you can manage.&lt;/p&gt;&lt;p&gt;Now move the entire shape such that it is centered on the &lt;em style="font-style: normal; letter-spacing: 0.125em; padding-left: 0.125em;"&gt;top left corner&lt;/em&gt;. This is (0,0) as far as SVG is concerned. Save it.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/kensanata/8512911746/" class="url http"&gt;&lt;img class="url http" src="https://farm9.staticflickr.com/8240/8512911746_4f1c405dba_o.png" alt="https://farm9.staticflickr.com/8240/8512911746_4f1c405dba_o.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Look at the SVG file and notice something like this:&lt;/p&gt;&lt;pre&gt;    &amp;lt;path
       style="fill:#000000;fill-opacity:1;stroke:none"
       d="m 7.647323,-20.341905 c -5.784973,-11.791839
       -36.204242,-5.139394 -43.951039,7.112364 8.922877,-5.977096
       34.793258,-11.641806 37.046343,-5.498373 -17.505656,0.485788
       -29.019956,5.940662 -33.027811,23.8472764 C
       -21.859546,-12.603312 -7.5022983,-14.191144 2.47485,-12.984161
       -8.2112223,6.06712 -19.987316,13.477858 -15.788864,50.225619 c
       3.988368,3.362713 8.6116517,-5.097214 4.510279,-7.531518
       -0.559084,-6.64895 -0.875559,-13.360661 -0.08632,-20.004922 C
       -9.6892813,9.718021 1.072969,-6.510207 8.835372,-12.256094
       26.823805,-7.758432 35.550312,0.1756144 34.450001,15.351883
       44.387089,3.7916614 29.882349,-11.701263 14.406587,-15.219388
       28.287217,-15.939127 40.549839,-6.589098 45.412784,1.4541824
       47.026796,-8.361333 28.866764,-19.205208 16.79733,-20.277164 c
       10.765708,-6.95198 25.316253,-3.074379 29.792108,3.226712
       -4.893545,-14.115874 -36.158133,-10.60357 -38.942114,-3.291453
       z"
       id="path3007"
       inkscape:connector-curvature="0"
       sodipodi:nodetypes="ccccccccccccccc" /&amp;gt;&lt;/pre&gt;&lt;p&gt;You can already extract this path and use it! Usually it takes several attempts to get the placement right. Once I&amp;#x2019;m happy, I turn all these floating point numbers into integers in order to save space. Personally, I use Emacs to do it (&lt;a class="inter EmacsWiki" href="http://emacswiki.org/emacs?RoundFloatingPoints"&gt;&lt;span class="site"&gt;EmacsWiki&lt;/span&gt;&lt;span class="separator"&gt;:&lt;/span&gt;&lt;span class="page"&gt;RoundFloatingPoints&lt;/span&gt;&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;This is what I want:&lt;/p&gt;&lt;pre class="real"&gt;m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13
-8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7
9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20
c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z&lt;/pre&gt;&lt;p&gt;Example input:&lt;/p&gt;&lt;pre class="real"&gt;0202 jungle
jungle attributes fill="white" stroke="#b3b3ff" stroke-width="3"
jungle path m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z&lt;/pre&gt;&lt;p&gt;Output:&lt;/p&gt;&lt;div style="width: 300px"&gt; &lt;a class="image outside" href="http://alexschroeder.ch/text-mapper?map=0101+jungle%0D%0Ajungle+attributes+fill%3D%22white%22+stroke%3D%22%23b3b3ff%22+stroke-width%3D%223%22%0D%0Ajungle+path+m+8%2C-20+c+-6%2C-12+-36%2C-5+-44%2C7+9%2C-6+35%2C-12+37%2C-5+-18%2C0+-29%2C6+-33%2C24+C+-22%2C-13+-8%2C-14+2%2C-13+-8%2C6+-20%2C13+-16%2C50+c+4%2C3+9%2C-5+5%2C-8+-1%2C-7+-1%2C-13+0%2C-20+C+-10%2C10+1%2C-7+9%2C-12+27%2C-8+36%2C0+34%2C15+44%2C4+30%2C-12+14%2C-15+28%2C-16+41%2C-7+45%2C1+47%2C-8+29%2C-19+17%2C-20+c+11%2C-7+25%2C-3+30%2C3+-5%2C-14+-36%2C-11+-39%2C-3+z"&gt;&lt;img class="upload" title="Jungle Hex" src="http://alexschroeder.ch/text-mapper?map=0101+jungle%0D%0Ajungle+attributes+fill%3D%22white%22+stroke%3D%22%23b3b3ff%22+stroke-width%3D%223%22%0D%0Ajungle+path+m+8%2C-20+c+-6%2C-12+-36%2C-5+-44%2C7+9%2C-6+35%2C-12+37%2C-5+-18%2C0+-29%2C6+-33%2C24+C+-22%2C-13+-8%2C-14+2%2C-13+-8%2C6+-20%2C13+-16%2C50+c+4%2C3+9%2C-5+5%2C-8+-1%2C-7+-1%2C-13+0%2C-20+C+-10%2C10+1%2C-7+9%2C-12+27%2C-8+36%2C0+34%2C15+44%2C4+30%2C-12+14%2C-15+28%2C-16+41%2C-7+45%2C1+47%2C-8+29%2C-19+17%2C-20+c+11%2C-7+25%2C-3+30%2C3+-5%2C-14+-36%2C-11+-39%2C-3+z" alt="Jungle Hex" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;p&gt;Example input:&lt;/p&gt;&lt;pre class="real"&gt;0101 jungle
jungle attributes fill="#9acd32" stroke="black" stroke-width="3"
jungle path attributes fill="#228b22"
jungle path m 8,-20 c -6,-12 -36,-5 -44,7 9,-6 35,-12 37,-5 -18,0 -29,6 -33,24 C -22,-13 -8,-14 2,-13 -8,6 -20,13 -16,50 c 4,3 9,-5 5,-8 -1,-7 -1,-13 0,-20 C -10,10 1,-7 9,-12 27,-8 36,0 34,15 44,4 30,-12 14,-15 28,-16 41,-7 45,1 47,-8 29,-19 17,-20 c 11,-7 25,-3 30,3 -5,-14 -36,-11 -39,-3 z
text font-size="20pt" dy="15px"&lt;/pre&gt;&lt;p&gt;Output:&lt;/p&gt;&lt;div style="width: 300px"&gt; &lt;a class="image outside" href="http://alexschroeder.ch/text-mapper?map=0101+jungle%0D%0Ajungle+attributes+fill%3D%22%239acd32%22+stroke%3D%22black%22+stroke-width%3D%223%22%0D%0Ajungle+path+attributes+fill%3D%22%23228b22%22%0D%0Ajungle+path+m+8%2C-20+c+-6%2C-12+-36%2C-5+-44%2C7+9%2C-6+35%2C-12+37%2C-5+-18%2C0+-29%2C6+-33%2C24+C+-22%2C-13+-8%2C-14+2%2C-13+-8%2C6+-20%2C13+-16%2C50+c+4%2C3+9%2C-5+5%2C-8+-1%2C-7+-1%2C-13+0%2C-20+C+-10%2C10+1%2C-7+9%2C-12+27%2C-8+36%2C0+34%2C15+44%2C4+30%2C-12+14%2C-15+28%2C-16+41%2C-7+45%2C1+47%2C-8+29%2C-19+17%2C-20+c+11%2C-7+25%2C-3+30%2C3+-5%2C-14+-36%2C-11+-39%2C-3+z%0D%0Atext+font-size%3D%2220pt%22+dy%3D%2215px%22%0D%0A"&gt;&lt;img class="upload" title="Green Jungle Hex" src="http://alexschroeder.ch/text-mapper?map=0101+jungle%0D%0Ajungle+attributes+fill%3D%22%239acd32%22+stroke%3D%22black%22+stroke-width%3D%223%22%0D%0Ajungle+path+attributes+fill%3D%22%23228b22%22%0D%0Ajungle+path+m+8%2C-20+c+-6%2C-12+-36%2C-5+-44%2C7+9%2C-6+35%2C-12+37%2C-5+-18%2C0+-29%2C6+-33%2C24+C+-22%2C-13+-8%2C-14+2%2C-13+-8%2C6+-20%2C13+-16%2C50+c+4%2C3+9%2C-5+5%2C-8+-1%2C-7+-1%2C-13+0%2C-20+C+-10%2C10+1%2C-7+9%2C-12+27%2C-8+36%2C0+34%2C15+44%2C4+30%2C-12+14%2C-15+28%2C-16+41%2C-7+45%2C1+47%2C-8+29%2C-19+17%2C-20+c+11%2C-7+25%2C-3+30%2C3+-5%2C-14+-36%2C-11+-39%2C-3+z%0D%0Atext+font-size%3D%2220pt%22+dy%3D%2215px%22%0D%0A" alt="Green Jungle Hex" /&gt;&lt;/a&gt; &lt;/div&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=RPG"&gt;RPG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/RPG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Maps"&gt;Maps&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Maps"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Text%20Mapper"&gt;Text Mapper&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Text%20Mapper"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Wed, 27 Feb 2013 10:33:04 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2013-02-27_New_Text_Mapper_Shapes</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2013-02-27_New_Text_Mapper_Shapes</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2013-02-27_New_Text_Mapper_Shapes</wiki:diff>
<category>RPG</category>
<category>Maps</category>
<category>SVG</category>
<category>Text Mapper</category>
</item>

<item>
<title>SVG Character Sheet</title>
<link>http://alexschroeder.ch/wiki/2012-09-01_SVG_Character_Sheet</link>
<guid>http://alexschroeder.ch/wiki/2012-09-01_SVG_Character_Sheet</guid>
<description>&lt;p&gt;For a while now I&amp;#x2019;ve been using this German SVG character sheet for my &lt;a class="near" title="Names" href="http://www.goblinoidgames.com/labyrinthlord.html"&gt;Labyrinth Lord&lt;/a&gt; game (it uses the &lt;a class="near" title="Names" href="http://www.miriamruiz.es/debfonts/fnt-1754ebd3bc2e1eaf5b833389bd7b72de.html"&gt;Purisa&lt;/a&gt; font):&lt;/p&gt;&lt;p&gt;&lt;a class="image" href="http://www.emacswiki.org/alex/pics/Charakterblatt.svg"&gt;&lt;img class="upload" title="" src="http://www.emacswiki.org/alex/pics/Charakterblatt.svg" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I&amp;#x2019;ve now written a little Perl script that allows you to fill in some of these variables using parameters. (&lt;a class="url http outside" href="http://campaignwiki.org/halberdsnhelmets/source"&gt;Source&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;Here&amp;#x2019;s an example URL:&lt;/p&gt;&lt;p&gt;&lt;a class="url http" href="http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5c%5ctwo;abilities=elvish%5c%5corcish"&gt;http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5c%5ctwo;abilities=elvish%5c%5corcish&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Result:&lt;/p&gt;&lt;p&gt;&lt;a class="image outside" href="http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5c%5ctwo;abilities=elvish%5c%5corcish"&gt;&lt;img class="upload" title="" src="http://campaignwiki.org/halberdsnhelmets?name=Alex;class=Elf;level=1;xp=0;ac=5;str=8;dex=18;con=9;int=10;wis=14;cha=15;breath=11;petrify=12;poison=13;wands=15;spells=16;hp=10;thac0=20;property=one%5c%5ctwo;abilities=elvish%5c%5corcish" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It needs more polishing and possibly the option of selecting different character sheets.&lt;/p&gt;&lt;p&gt;I&amp;#x2019;ve written a text formatting rule for my &lt;a class="near" title="Names" href="http://www.campaignwiki.org/"&gt;Campaign Wiki&lt;/a&gt; that makes it easy to put your character&amp;#x2019;s stats on a web page and have it render as a SVG character sheet.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a class="inter CW outside" href="http://campaignwiki.org/wiki/F%C3%BCnfWinde/Tehah"&gt;a character page with the generated character sheet&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="inter CW outside" href="http://campaignwiki.org/wiki/F%C3%BCnfWinde/raw/Tehah"&gt;raw text as you would write it&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="url http outside" href="http://campaignwiki.org/halberdsnhelmets?name=Tehah;class=Elf;level=1;xp=100;ac=9;hp=5;str=15;dex=9;con=15;int=10;wis=9;cha=7;breath=15;poison=12;petrify=13;wands=13;spells=15;property=Zauberbuch%20%28Gerdana%29%3a%5C%5C%E2%80%A2%20Einschl%C3%A4ferndes%20Rauschen;abilities=Ghinorisch%5C%5CElfisch;thac0=19"&gt;click on the sheet in order to print it, maybe&lt;/a&gt;?&lt;/li&gt;&lt;li&gt;&lt;a class="url http outside" href="http://campaignwiki.org/halberdsnhelmets/en?name=Tehah;class=Elf;level=1;xp=100;ac=9;hp=5;str=15;dex=9;con=15;int=10;wis=9;cha=7;breath=15;poison=12;petrify=13;wands=13;spells=15;property=Spell%20book%20%28Gerdana%29%3a%5C%5C%E2%80%A2%20sleep;abilities=Ghinorian%5C%5Celvish;thac0=19"&gt;the same thing using the English template&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="url http outside" href="http://campaignwiki.org/halberdsnhelmets/show"&gt;the German character sheet explaining itself&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="url http outside" href="http://campaignwiki.org/halberdsnhelmets/show/en"&gt;the English character sheet explaining itself&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="url http outside" href="http://campaignwiki.org/halberdsnhelmets"&gt;the script listing the computed parameters&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=RPG"&gt;RPG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://www.emacswiki.org/alex/feed/full/RPG"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Old%20School"&gt;Old School&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://www.emacswiki.org/alex/feed/full/Old%20School"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://www.emacswiki.org/alex/feed/full/SVG"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Character%20Sheet"&gt;Character Sheet&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://www.emacswiki.org/alex/feed/full/Character%20Sheet"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Sat, 01 Sep 2012 00:13:31 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2012-09-01_SVG_Character_Sheet</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2012-09-01_SVG_Character_Sheet</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2012-09-01_SVG_Character_Sheet</wiki:diff>
<category>RPG</category>
<category>Old School</category>
<category>SVG</category>
<category>Character Sheet</category>
</item>

<item>
<title>Map Drawing Using Polygons</title>
<link>http://alexschroeder.ch/wiki/2011-04-30_Map_Drawing_Using_Polygons</link>
<guid>http://alexschroeder.ch/wiki/2011-04-30_Map_Drawing_Using_Polygons</guid>
<description>&lt;p&gt;I&amp;#x2019;m currently working on randomly generating islands using the ideas presented in &lt;a class="url http outside" href="http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/"&gt; Polygonal Map Generation&lt;/a&gt; by Amit. Check out his &lt;a class="url http outside" href="http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/mapgen2.swf"&gt;Flash demo&lt;/a&gt;! I am nowhere as far, yet. I&amp;#x2019;m writing my code in Perl and &lt;a class="url http outside" href="http://campaignwiki.org/monones.pl"&gt;producing SVG output&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.flickr.com/photos/kensanata/5671163434/" class="url http"&gt;&lt;img class="url http" src="http://farm6.static.flickr.com/5303/5671163434_e3b86d4dde.jpg" alt="http://farm6.static.flickr.com/5303/5671163434_e3b86d4dde.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;See below for source code used. I&amp;#x2019;d install it on a public server, but unfortunately there are quite some dependencies…&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Maps"&gt;Maps&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Maps"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Perl"&gt;Perl&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Perl"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;pre class="real"&gt;#! /usr/bin/perl -w
# Copyright (C) 2011  Alex Schroeder &amp;lt;alex@gnu.org&amp;gt;
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.

use strict;
use CGI qw(:standard);
use SVG;
use Math::Geometry::Voronoi;
use Class::Struct;
use Math::Fractal::Noisemaker;
use List::Util qw(min max);
use Data::Dumper;

my $points = 3000;
my $width  = 1000;
my $height =  550;
my $center_x = $width / 2;
my $center_y = $height / 2;
my $radius = 500;

my %color = (beach =&amp;gt; '#a09077',
	     ocean =&amp;gt; '#44447a',);

struct World =&amp;gt; { points =&amp;gt; '@',
		  centroids =&amp;gt; '@',
		  voronoi =&amp;gt; '$',
		  height =&amp;gt; '@',
		};

sub add_random_points {
  my ($world) = @_;
  for (my $i = 0; $i &amp;lt; $points; $i++) {
    push(@{$world-&amp;gt;points}, [rand($width), rand($height)]);
  };
  # print(join("\n", map {join(",", $_-&amp;gt;[0], $_-&amp;gt;[1])} @{$world-&amp;gt;points}));
  return $world;
}

sub add_voronoi {
  my ($world) = @_;
  $world-&amp;gt;voronoi(Math::Geometry::Voronoi-&amp;gt;new(points =&amp;gt; $world-&amp;gt;points));
  $world-&amp;gt;voronoi-&amp;gt;compute;
}

sub add_centroids {
  my ($world) = @_;
  $world-&amp;gt;centroids([]); # clear
  foreach my $polygon ($world-&amp;gt;voronoi-&amp;gt;polygons) {
    push(@{$world-&amp;gt;centroids}, centroid($polygon));
  }
}

sub centroid {
  my ($cx, $cy) = (0, 0);
  my $A = 0;
  my $polygon = shift;
  my ($point_index, @points) = @$polygon; # see Math::Geometry::Voronoi
  my $point = $points[$#points];
  my ($x0, $y0) = ($point-&amp;gt;[0], $point-&amp;gt;[1]);
  for $point (@points) {
    my ($x1, $y1) = ($point-&amp;gt;[0], $point-&amp;gt;[1]);
    $cx += ($x0 + $x1) * ($x0 * $y1 - $x1 * $y0);
    $cy += ($y0 + $y1) * ($x0 * $y1 - $x1 * $y0);
    $A += ($x0 * $y1 - $x1 * $y0);
    ($x0, $y0) = ($x1, $y1);
  }
  $A /= 2;
  $cx /= 6 * $A;
  $cy /= 6 * $A;
  return [$cx, $cy, $point_index];
}

sub add_height {
  my $world = shift;
  $Math::Fractal::Noisemaker::QUIET = 1;
  my $grid = Math::Fractal::Noisemaker::square();
  $world-&amp;gt;height([]); # clear
  my $scale = max($height, $width); # grid is a square
  foreach my $point (@{$world-&amp;gt;points}) {
    my $x = int($point-&amp;gt;[0]*255/$scale);
    my $y = int($point-&amp;gt;[1]*255/$scale);
    my $h = 0; # we must not skip any points!
    $h = $grid-&amp;gt;[$x]-&amp;gt;get($y) / 255
      unless $x &amp;lt; 0 or $y &amp;lt; 0 or $x &amp;gt; 255 or $y &amp;gt; 255;
    push(@{$world-&amp;gt;height}, $h);
  }
}

sub raise_point {
  my ($world, $x, $y, $radius) = @_;
  my $i = 0;
  foreach my $point (@{$world-&amp;gt;points}) {
    my $dx = $point-&amp;gt;[0] - $x;
    my $dy = $point-&amp;gt;[1] - $y;
    my $d = sqrt($dx * $dx + $dy * $dy);
    my $v = max(0, $world-&amp;gt;height-&amp;gt;[$i] - $d / $radius);
    $world-&amp;gt;height($i, $v);
    $i++;
  }
}

sub svg {
  my $world = shift;
  my $svg = new SVG(-width =&amp;gt; $width,
		    -height =&amp;gt; $height, );
  foreach my $polygon ($world-&amp;gt;voronoi-&amp;gt;polygons) {
    my ($point_index, @points) = @$polygon; # see Math::Geometry::Voronoi
    my $x = $world-&amp;gt;points-&amp;gt;[$point_index]-&amp;gt;[0];
    my $y = $world-&amp;gt;points-&amp;gt;[$point_index]-&amp;gt;[1];
    next if $x &amp;lt; 0 or $y &amp;lt; 0 or $x &amp;gt; $width or $y &amp;gt; $height;
    my $z = int($world-&amp;gt;height-&amp;gt;[$point_index] * 255);
    my $color = $z == 0 ? $color{ocean} : "rgb($z,$z,$z)";
    my $path = join(",", map { map { int } @$_ } @points);
    $svg-&amp;gt;polygon(points =&amp;gt; $path,
		  fill =&amp;gt; $color,
		  style =&amp;gt; { 'stroke-width' =&amp;gt; 1,
			     'stroke' =&amp;gt; 'black'});
  }
  return $svg-&amp;gt;xmlify();
}

sub response {
  print header(-type=&amp;gt;'image/svg+xml');
  print shift;
}

sub main {
  if (path_info eq '/source') {
    seek DATA, 0, 0;
    print "Content-type: text/plain; charset=UTF-8\r\n\r\n", &amp;lt;DATA&amp;gt;;
  } else {
    srand(param('seed') || time);
    my $world = new World;
    add_random_points($world, $points);
    add_voronoi($world);
    for (my $i = 2; $i--; ) {
      # Lloyd Relaxation
      add_centroids($world);
      $world-&amp;gt;points($world-&amp;gt;centroids);
      add_voronoi($world);
    }
    # skip corner improvement
    # skip Delaunay triangulation
    add_height($world);
    raise_point($world, $center_x, $center_y, $radius);
    # draw
    response(svg($world));
  }
}

main ();

__DATA__&lt;/pre&gt;</description>
<pubDate>Sat, 30 Apr 2011 00:05:50 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2011-04-30_Map_Drawing_Using_Polygons</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2011-04-30_Map_Drawing_Using_Polygons</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2011-04-30_Map_Drawing_Using_Polygons</wiki:diff>
<category>Maps</category>
<category>Perl</category>
<category>SVG</category>
</item>

<item>
<title>Javascript</title>
<link>http://alexschroeder.ch/wiki/2010-05-10_Javascript</link>
<guid>http://alexschroeder.ch/wiki/2010-05-10_Javascript</guid>
<description>&lt;p&gt;I still haven&amp;#x2019;t learnt Javascript. Right now I&amp;#x2019;m trying to integrate &lt;a class="url http outside" href="http://code.google.com/p/svg-edit/"&gt;svg-edit&lt;/a&gt; and &lt;a class="local" href="http://alexschroeder.ch/wiki/Oddmuse"&gt;Oddmuse&lt;/a&gt;. This requires some Javascript voodoo that escapes me.&lt;/p&gt;&lt;p&gt;If you upload a SVG file to &lt;a class="url http" href="http://www.emacswiki.org/test/SVG_Test"&gt;http://www.emacswiki.org/test/SVG_Test&lt;/a&gt;, you&amp;#x2019;ll be able to look at it. I&amp;#x2019;m using an iframe to do that.&lt;/p&gt;&lt;p&gt;If you then click on &lt;em style="text-decoration: underline; font-style: normal;"&gt;Edit this page&lt;/em&gt; and then on &lt;em style="text-decoration: underline; font-style: normal;"&gt;Edit image in the browser&lt;/em&gt;, you&amp;#x2019;ll get the SVG editor.&lt;/p&gt;&lt;p&gt;What I&amp;#x2019;m lacking is loading and saving the image!&lt;/p&gt;&lt;p&gt;If you look around the svg-edit project&amp;#x2019;s pages, you&amp;#x2019;ll note example code like the following:&lt;/p&gt;&lt;pre&gt;    svgEditor.loadFromString('&amp;lt;svg&amp;gt;...&amp;lt;/svg&amp;gt;');&lt;/pre&gt;&lt;p&gt;What I don&amp;#x2019;t understand is where this code runs and how svgEditor is set.&lt;/p&gt;&lt;p&gt;If I simply add the following to the top of the page, inside the header, then Firebug will tell me that the svgEditor object does not exist.&lt;/p&gt;&lt;pre&gt;    &amp;lt;script type="text/javascript"&amp;gt;
      svgEditor.loadFromString('&amp;lt;svg&amp;gt;...&amp;lt;/svg&amp;gt;');
    &amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;p&gt;What now? Is this a variable &amp;#x201c;inside&amp;#x201d; the iframe? Is this something I need to initialize by calling a function? Which one?&lt;/p&gt;&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;: Perhaps I&amp;#x2019;m running into some cross-site scripting protection. The site runs on www.emacswiki.org, the SVG editor runs on svg-edit.googlecode.com. Using Firebug, I run  &lt;code&gt;document.getElementsByName('svgEditor')[0].getSVGDocument().setUserData('fd')&lt;/code&gt; and get an error message. &lt;img class="smiley" src="http://www.emacswiki.org/pics/warning.png" alt="warning" /&gt;&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Javascript"&gt;Javascript&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Javascript"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:SVG"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Wiki"&gt;Wiki&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Wiki"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Tue, 11 May 2010 00:00:35 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2010-05-10_Javascript</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2010-05-10_Javascript</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2010-05-10_Javascript</wiki:diff>
<category>Javascript</category>
<category>SVG</category>
<category>Wiki</category>
</item>

<item>
<title>SVG, CSS, and Inkscape</title>
<link>http://alexschroeder.ch/wiki/2009-09-19_SVG%2c_CSS%2c_and_Inkscape</link>
<guid>http://alexschroeder.ch/wiki/2009-09-19_SVG%2c_CSS%2c_and_Inkscape</guid>
<description>&lt;p&gt;I have a problem with &lt;a class="near" title="Names" href="http://www.inkscape.org/"&gt;Inkscape&lt;/a&gt; and I think it&amp;#x2019;s related to the handling or loss of CSS information. I have a script that creates an SVG map which looks fine in Firefox &amp;#x2013; &lt;a class="url http outside" href="http://www.emacswiki.org/cgi-bin/svg-map"&gt;check it out&lt;/a&gt; and hit the submit button.&lt;/p&gt;&lt;p&gt;When I import that &lt;a class="near" title="Wikipedia" href="http://en.wikipedia.org/wiki/SVG"&gt;SVG&lt;/a&gt; into another SVG in order to add more layers, &lt;a class="url http outside" href="http://campaignwiki.org/pics/Kaylash/Kaylash_Subsektor_Karte%2c_mit_Routen.png"&gt;everything looks more or less ok&lt;/a&gt;. One thing that&amp;#x2019;s already wrong is that the hex coordinates are missing. When I save the file, close Inkscape, open Inkscape again, and reopen the new file, &lt;a class="url http outside" href="http://campaignwiki.org/wiki/Kaylash/download/Kaylash.svg"&gt;things are messed up&lt;/a&gt;:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Coordinates are still missing&lt;/li&gt;&lt;li&gt;Font sizes are wrong for the coordinates&lt;/li&gt;&lt;li&gt;Symbols (text elements) around planets have some sort of white border&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Do you think Inkscape will have an easier time handling the SVG if I don&amp;#x2019;t use CSS to specificy stroke width, opacity, and the like?&lt;/p&gt;&lt;p&gt;I&amp;#x2019;m using Inkscape 0.46 at the moment.&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Software"&gt;Software&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Software"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=CSS"&gt;CSS&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:CSS"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:SVG"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Inkscape"&gt;Inkscape&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Inkscape"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Sat, 19 Sep 2009 20:19:55 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2009-09-19_SVG%2c_CSS%2c_and_Inkscape</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2009-09-19_SVG%2c_CSS%2c_and_Inkscape</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2009-09-19_SVG%2c_CSS%2c_and_Inkscape</wiki:diff>
<category>Software</category>
<category>CSS</category>
<category>SVG</category>
<category>Inkscape</category>
</item>

<item>
<title>Traveller Map Based on UWP</title>
<link>http://alexschroeder.ch/wiki/2009-09-11_Traveller_Map_Based_on_UWP</link>
<guid>http://alexschroeder.ch/wiki/2009-09-11_Traveller_Map_Based_on_UWP</guid>
<description>&lt;p&gt;There is an &lt;a class="url http outside" href="http://travellermap.com/api.htm"&gt;amazing Traveller Map API&lt;/a&gt; available out there. Specifically, there&amp;#x2019;s a service that will produce a &lt;a class="url http outside" href="http://www.travellermap.com/post.htm"&gt;PDF based on your UWP list&lt;/a&gt;. But you know how it is. I bet half the Traveller referees are trying to code up subsector generators and mappers. Me too!&lt;/p&gt;&lt;p&gt;Here&amp;#x2019;s my &lt;a class="url http outside" href="http://emacswiki.org/cgi-bin/svg-map"&gt;SVG Mapper for Traveller&lt;/a&gt;. It comes with example data so you can figure out what format it expects by looking at it. Just klick the Submit button! Remember, you need a browser that knows how to deal with SVG files – &lt;a class="local" href="http://alexschroeder.ch/wiki/Firefox"&gt;Firefox&lt;/a&gt; will do.&lt;/p&gt;&lt;p&gt;&lt;a class="url http outside" href="http://emacswiki.org/cgi-bin/svg-map/source"&gt;Source code is available&lt;/a&gt;. I got to reuse some of my abandoned &lt;a class="local" href="http://alexschroeder.ch/wiki/2007-06-08_Old_School_Hex_Mapper_Getting_Better"&gt;Old School Hex Mapper&lt;/a&gt;. And figuring out the trigonometry stuff is fun. &lt;img class="smiley" src="http://www.emacswiki.org/pics/smile.png" alt=":)" /&gt; &lt;img class="smiley" src="http://www.emacswiki.org/pics/ok.png" alt="ok" /&gt;&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=RPG"&gt;RPG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/RPG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Traveller"&gt;Traveller&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Traveller"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Hex"&gt;Hex&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Hex"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Maps"&gt;Maps&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Maps"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Graphics"&gt;Graphics&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Graphics"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;/p&gt;</description>
<pubDate>Fri, 11 Sep 2009 00:25:15 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2009-09-11_Traveller_Map_Based_on_UWP</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2009-09-11_Traveller_Map_Based_on_UWP</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2009-09-11_Traveller_Map_Based_on_UWP</wiki:diff>
<category>RPG</category>
<category>Traveller</category>
<category>Hex</category>
<category>Maps</category>
<category>Graphics</category>
<category>SVG</category>
</item>

<item>
<title>Corporate Wikis</title>
<link>http://alexschroeder.ch/wiki/2008-09-12_Corporate_Wikis</link>
<guid>http://alexschroeder.ch/wiki/2008-09-12_Corporate_Wikis</guid>
<description>&lt;p&gt;There was a lot of talk about corporate wikis, measuring corporate wiki participation, and some wikis &amp;#x201c;competing&amp;#x201d; for use in the corporate area.&lt;/p&gt;&lt;p&gt;Oddmuse is definitely not a &amp;#x201c;corporate wiki&amp;#x201d; in this respect. I think the problem is the process of decision making: Someone starts with a list of features and goes to collect more items for that list by talking to other &amp;#x201c;stakeholders&amp;#x201d; in the company. This is what you end up with:&lt;/p&gt;&lt;p&gt;&lt;a class="image outside" href="http://www.emacswiki.org/alex/pics/Corporate%20Wikis.svg"&gt;&lt;img class="upload" title="Corporate wikis are a waste of time" src="http://www.emacswiki.org/alex/pics/Corporate%20Wikis.png" alt="Corporate wikis are a waste of time" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Yeah, I&amp;#x2019;m being mean. &lt;img class="smiley" src="http://www.emacswiki.org/pics/smile.png" alt=":)" /&gt;&lt;/p&gt;&lt;p&gt;Damn, I forgot &lt;abbr title="what you see is what you get"&gt;WYSIWYG&lt;/abbr&gt;, blog integration, &lt;abbr title="content management system"&gt;CMS&lt;/abbr&gt;, mailing list integration, bug tracking system integration, calendar integration, &amp;#x2026; there&amp;#x2019;s so &lt;em style="text-decoration: underline; font-style: normal;"&gt;much&lt;/em&gt; out there!&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Wiki"&gt;Wiki&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Wiki"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=WikiSym"&gt;WikiSym&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/WikiSym"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=WikiSym2008"&gt;WikiSym2008&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/WikiSym2008"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Oddmuse"&gt;Oddmuse&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Oddmuse"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Diagram"&gt;Diagram&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Diagram"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=SVG"&gt;SVG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/SVG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Inkscape"&gt;Inkscape&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Inkscape"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Fri, 12 Sep 2008 10:44:46 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2008-09-12_Corporate_Wikis</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2008-09-12_Corporate_Wikis</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2008-09-12_Corporate_Wikis</wiki:diff>
<category>Wiki</category>
<category>WikiSym</category>
<category>WikiSym2008</category>
<category>Oddmuse</category>
<category>Diagram</category>
<category>SVG</category>
<category>Inkscape</category>
</item>
</channel>
</rss>
