This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Painting in Python

Tags: None
(comma "," separated)
sofuego
Registered Member
Posts
8
Karma
0

Painting in Python

Mon May 18, 2020 2:04 am
Is it possible? If so how do the coordinates work? I've been digging through the docs and was off to an awesome start, but I didn't see anything for simulating mouse/tablet drawing.

Code: Select all
from krita import *
d = Krita.instance().createDocument(512, 512, "Python test document", "RGBA", "U8", "", 120.0)
Krita.instance().activeWindow().addView(d)
root = d.rootNode();
root.childNodes()[0].remove()
l2 = d.createNode("test", "paintlayer")
root.addChildNode(l2, None)
print(dir(l2))
User avatar
halla
KDE Developer
Posts
5092
Karma
20
OS

Re: Painting in Python

Mon May 18, 2020 8:03 am
No, it isn't possibble.


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell