Inkscape.org
Beyond the Basics Is there a way to do a Skew Transformation from the Command Line?
  1. #1
    Peter Kelley Peter Kelley @yellek

    After looking through the actions and verbs I don't see a way to do this. 

    In the actions I see the following:

    transform-remove    :  Remove any transforms from selected objects
    transform-rotate    :  Rotate selected objects by degrees
    transform-scale     :  Scale selected objects by scale factor
    transform-translate :  Translate selected objects (dx,dy)
    

    But no skew.

    Is there a way to do this?

    Why do I want to do this? I want to insert text into an isometric template programmatically and so need to skew it to have it look right.
     

  2. #2
    inklinea inklinea @inklinea⛰️

    I do not think it is possible.

    You can easily replace the transform attribute, however is it a replacement not additive. Unless you use an external script to retrieve the current transform then combine them. 

    This will add a skew, but it is destructive.

    inkscape --batch-process --actions="select-all;object-set-attribute:transform,skewX(30);export-filename:skewed.svg;export-do;" testfile.svg

    If you write your own python extension, they can be accessed from the command line just like any other verb.

  3. #3
    Peter Kelley Peter Kelley @yellek

    Thanks for the answer. I am going to have to play around a bit to see if I can achieve the result I am looking for.

    I guess the alternative would be to do a perspective transformation of my text object using my desired isometric shape. Do you think that would be possible from the command line? 

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Is there a way to do a Skew Transformation from the Command Line?