[PD] svg script (with pdlua?)

João Pais jmmmpais at googlemail.com
Wed Mar 11 18:54:21 CET 2015


Hello list,

I wanted to create an svg file using Pd, but it's a bit hard, as the  
character "," can't be used by [textfile]. There could be some ways to  
circumvent this such as using another character and change it in a text  
editor. But I would like to ask if there is any other examples, e.g. about  
using [pdlua] or something else to create the file.

The file to be created would look a bit like this:

<svg xmlns="http://www.w3.org/2000/svg"  
xmlns:xlink="http://www.w3.org/1999/xlink" width="400">
   <!--
180 V0
70 V1
50 V2
90 V3
-->
   <g stroke="black" transform="translate(20,20) scale(.78)" font-size="10"  
font-family="Courier">
     <line x1="0" x2="390"/>

     <g transform="translate(0,0)">
       <text x="5" y="-5">V0</text>
       <line y1="-5" y2="5"/>
     </g>
     <g transform="translate(180,0)">
       <text>V1</text>
       <line y1="-5" y2="5"/>
     </g>
     <g transform="translate(250,0)">
       <text>V2</text>
       <line y1="-5" y2="5"/>
     </g>
     <g transform="translate(300,0)">
       <text>V3</text>
       <line y1="-5" y2="5"/>
     </g>


     <g transform="translate(390,0)">
       <line y1="-5" y2="5"/>
     </g>
   </g>
</svg>

Thanks,

jmmmp



More information about the Pd-list mailing list