Draw on canvas?

Is it possible to draw on canvas using script? Eg. drawing line/circle/rect providing coordinates as parameters?

The only way I found out to set a mark on the canvas was to create a selection and then stroke it. Even that requires a manual intervention of the stroke dialog box.

Thanks!

1 Like

Hi

Currently no.

There’s a work in progress, but merge request is currently not ready yet…

For now, drawing on a canvas through script is possible but you can only do it through a QPainter (ie: you only have access to Qt API to draw, don’t expect to draw with Krita’s brushes)

Grum999

1 Like

Thanks for the info!

That’s interesting! You don’t happen to have some example code to do that via Krita+Python, do you? I’d like to draw just e.g. a filled circle on a frame. While I have found PyQt examples, I haven’t found anything that ties this into Krita.

Hi

Here an example to draw a simple animation.

Otherwise you can take a look on plugin Composition Helper

in this plugin you’ll see how to draw on a paint layer and vector layer (but maybe the code is not “easy” to follow for a beginner… :thinking:)

Grum999

This is exactly the sort of thing I was looking for. Much appreciated!