Results 1 to 9 of 9

Thread: What software should I use to label my maps?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,201
    Blog Entries
    8

    Post

    Ah we were just talking about that chez moi. Can inkscape be scripted so that we could pass in a list of names at coords and rotations etc and it will render all that up ? I have a script to do the names in perlmagick but at mo its only rendering them horizontally so since the topic has come up what scriptable options are there.

  2. #2

    Post

    Quote Originally Posted by Redrobes View Post
    Ah we were just talking about that chez moi. Can inkscape be scripted so that we could pass in a list of names at coords and rotations etc and it will render all that up ? I have a script to do the names in perlmagick but at mo its only rendering them horizontally so since the topic has come up what scriptable options are there.
    It is pretty much all scripts! Inkscape extensions are written in python (one of the reasons I'm trying to learn it...I hacked together one extension using a Lego brick approach, but hosestly has no idea about the language).

    Inkscape files are just SVG so theoretically you could just create them yourself using an XML toolset and then render as a png from the command line using Inkscape. The simple transforms would be translation, rotation, skewing and scaling. Having the text along a path requires a bezier curve and the text. Here (for fun) is the code for such a thing, with the fill and stroke of the bezier curve set to none so it doesn't show up:
    Code:
          <path
             id="path2816"
             d="m 117.28118,236.87483 c 151.42857,-128.57143 291.42857,-42.85715 305.71429,-20"
             style="color:#000000;fill:none;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
          <text
             id="text2818"
             style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;text-align:start;text-anchor:start;fill:#204a87;stroke:#ef2929;stroke-width:2;font-family:Arial Black;-inkscape-font-specification:Arial Black Heavy"
             xml:space="preserve"><textPath
               id="textPath2822"
               xlink:href="#path2816"><tspan
       id="tspan2820"
       style="font-size:48px;text-align:start;text-anchor:start;fill:#204a87;stroke:#ef2929;stroke-width:2">Hello World</tspan></textPath></text>
    and the image it renders:

    Click image for larger version. 

Name:	text_on_path.png 
Views:	74 
Size:	14.4 KB 
ID:	14192

    -Rob A>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •