lifelike / countersheetsextension

Inkscape extension for the layout of sheets of cards, tiles, or counters for boardgames.
Other
233 stars 27 forks source link

Object cloned twice: scaling clone also moves it. #42

Closed jaafit closed 5 years ago

jaafit commented 5 years ago

I'm making cards where the same set of icons need to show up in two different locations. For this, I have cloned the same icon objects twice. Both clones go in the template but one of those clones, I scaled bigger. In the csv, the clones are both referenced in the same column with a wildcard header. The expected icons show according to the csv, but the scaled clones are translated away from the clone's location. This doesn't happen if they are not scaled.

Is there a better way to do what I want without duplicating column values? Do you want example files?

lifelike commented 5 years ago

Could reproduce it by adding a scaled-down clone to svgtests/input/use.svg.

No obvious solution but will look at it.

lifelike commented 5 years ago

Fixed it by combining the calculated offset for clone element properly (append instead of prepend to original transform).

As I mentioned in the commit message there are probably still ways you can break this with some creativity. I have not exhaustively tested all the possible transforms that could be applied to the cloned element or the clone element.

jaafit commented 5 years ago

Works now, thanks!