abey79 / vpype

The Swiss-Army-knife command-line tool for plotter vector graphics.
https://vpype.readthedocs.io/
MIT License
699 stars 61 forks source link

resizing and layering is a bit wonky #2

Closed zoso95 closed 4 years ago

zoso95 commented 4 years ago

So I'm trying to do

vpype \ read -l 1 $BLUE scale --to 11in 8.5in \ read -l 2 $RED scale --to 11in 8.5in \ write -l -p a4 --center $OUT

This will only resize the last read layer (so this will rescale red, but not blue). I've tested out the rescaling on both SVGs and they work fine individually.

abey79 commented 4 years ago

scale is an individual command, separate from read. It must be told which layer to affect. In both of your scale command, you omitted the --layer parameter, so both act on everything. Layer 1 in particular gets rescaled twice. You need to add -l 1 to the first scale and -l 2 to the second.

zoso95 commented 4 years ago

Oh that makes sense. It could be nice to have that in the readme

abey79 commented 4 years ago

Technically, it is mentioned (Layer section, paragraph on filters, although scale is not explicitly listed). But making that documentation suitable for someone who is not a total nerd is a big challenge that I will have to take on (or recruit help for) at some point.