On 03/11/2015 01:54 PM, João Pais wrote:
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.
From what I remember, the svg spec says you can use commas or spaces to separate the values in your transforms. So-- at least in your example-- you can just use spaces instead.
-Jonathan
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
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list