[Ipe-discuss] scaling -- line width
Tim Hutt
tdhutt at gmail.com
Fri Jun 11 12:30:32 CEST 2010
On 11 June 2010 10:17, Alexander Bürger <acfbuerger at googlemail.com> wrote:
> In addition, I convert from a different file format, so I have absolute
> line widths.
Ah in that case I suppose you could save the bit you want to import as
xml, and write a little script to go through the pen="???" to modify
them. I can't think of an easier way anyway (the best thing would be a
lua ipelet but that might be more work if you don't already know lua
and the IPE API).
I think you can do it with this regex (after loading the file into $xml):
$xml =~ s/pen="([\d\.]+)"/"pen=\"".($1*69)."\""/ge
Where 69 is your scaling factor. NB: I couldn't quite get this to work
with this regex. It doesn't like the $1*69 for some reason.
More information about the Ipe-discuss
mailing list