Inkscape.org
Creating New Extensions Corner pin or distort text
  1. #1
    DrQt DrQt @DrQt

    Can corner_pinned text be scripted?
    Warp, deform, lattice, along path etc..? 

    The closest I've been able to find is:
    https://gitlab.com/inkscape/extensions/-/blob/master/pathmodifier.py

    I have 4 target points I need to fit text to.  How can I got about that?

  2. #2
    DrQt DrQt @DrQt
    *

    I was able to get perspective working in the interface
    (following a target path clockwise, Bottom Left, Top Left, Top Right, Bottom Right)

    Is there a way to run the perspective extension and extensions in general from within a script without pasting in the code or invoking verbs/actions on the cli?

  3. #3
    inklinea inklinea @inklinea⛰️

    I think in general you can just do this: 

    import pathmodifier
    inkex.errormsg(dir(pathmodifier))

    Should give you access to the above extension code.

    However I have not tested this on Windows, just Ubuntu.

     

  4. #4
    DrQt DrQt @DrQt

    Hi,

    I'm attempting this with the incadiff script (still a few steps away from using pathmodifier)

    How do I run the imported extension? 

    I tried calling incadiff.effect(self)
    Also tried instatntiating a class:  diff = incadiff.IncadiffExtension()

    Both gave errors though.