Inkscape.org
Creating New Extensions Deprecated libraries
  1. #1
    Mateocasa25 Mateocasa25 @Mateocasa25

    I have several warnings converting my extension to 1.0 with the library simplepath. Any recommendation to use instead?

     

    /usr/share/inkscape/extensions/mateoIU/app/bin/path.py:260: DeprecationWarning: simpletransform.applyTransformToPath -> Path(path).transform(mat)
      simpletransform.applyTransformToPath(mat, path)
    /usr/share/inkscape/extensions/mateoIU/app/bin/path.py:261: DeprecationWarning: inkex.bezier.cspsubdiv -> Sub-divide cubic sub-paths
      cspsubdiv.cspsubdiv(path, self.flat)
    /usr/share/inkscape/extensions/mateoIU/app/bin/path.py:156: DeprecationWarning: simpletransform.parseTransform -> Transform(str).matrix
      groupmat = simpletransform.composeTransform(groupmat, simpletransform.parseTransform('rotate(' + '0' + ')'))
    /usr/share/inkscape/extensions/mateoIU/app/bin/path.py:156: DeprecationWarning: simpletransform.composeTransform -> Transform(M1) * Transform(M2)
      groupmat = simpletransform.composeTransform(groupmat, simpletransform.parseTransform('rotate(' + '0' + ')'))

     

    Thanks

  2. #2
    Martin Owens Martin Owens @doctormo🌹🧀

    All `simple` modules are deprecated. You need to follow the instructions on each one of the warnings.

    So where you have parseTransform, use `inkex.Transform` where you have composeTransform use `inkex.Transform(A) * inkex.Transform(B)` etc.

    See the documentation here: https://inkscape.gitlab.io/extensions/documentation/