![]() Registered Member ![]()
|
Hello.
I'm trying to make python plugin script after tutorial( https://docs.krita.org/en/user_manual/p ... pting.html ). I will make python script, that is write characters by svg (vertical writing for Ubuntu). But I can't understand method of import KoSVGTextShape in python. I thinking the reason, that is KoSVGTextShape in KritaFlake. How to import KritaFlake's class?
~ krita.scripting: " from krita import KoSVGTextShape" krita.scripting: "ImportError: cannot import name 'KoSVGTextShape'" ~ |
![]() KDE Developer ![]()
|
You can only use classes defined in the libkis library: https://api.kde.org/extragear-api/graph ... bkis/html/ -- other C++ classes are not accessible from Python.
You could try to use the VectorLayer class: https://api.kde.org/extragear-api/graph ... Layer.html, but the Shape class currently only has a toSvg, no fromSvg. We would have to extend the API to support what you want to do -- which is something I'm very interested in! |
![]() Registered Member ![]()
|
Thank you for ansewering!
I have understood it now. I will try to make function with VectorLayer class or direct edit C++ Source, until you begin support API. I'm looking forward it! If can I help you, please send message to me! |
Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]