# New user with questions about programming with krita

**URL:** <https://krita-artists.org/t/new-user-with-questions-about-programming-with-krita/64291>\
**Category:** Develop\
**Created:** [April 26, 2023, 3:03pm UTC](https://krita-artists.org/t/new-user-with-questions-about-programming-with-krita/64291 "2023-04-26T15:03:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oscar\_adalid](https://krita-artists.org/user_avatar/krita-artists.org/oscar_adalid/32/58061_2.png) [@oscar\_adalid](https://krita-artists.org/u/oscar_adalid)\
**Post date:** [April 26, 2023, 3:03pm UTC](https://krita-artists.org/t/new-user-with-questions-about-programming-with-krita/64291/1 "2023-04-26T15:03:01Z")

</div>

Hello, it is possible to program brushes with scripts, as it happens in firealpaca?

1. Can someone provide me with a simple example that paints a round brush with the tablet?  
A simple example and how to program is appreciated.
2. Is there a function get\_pixel and put\_pixel?  
3.If so, I would like to implement them in krita. If it is very difficult, I don’t know how to program it here, I can show an example of them and someone expert in programming implements it, they should only pass my algorithm to krita.  
All the best.

---

<div class="post-metadata">

**Author:** ![Takiro](https://krita-artists.org/user_avatar/krita-artists.org/takiro/32/209381_2.png) [@Takiro](https://krita-artists.org/u/Takiro)\
**Post date:** [April 26, 2023, 5:10pm UTC](https://krita-artists.org/t/new-user-with-questions-about-programming-with-krita/64291/2 "2023-04-26T17:10:48Z")

</div>

No it’s not possible to script brushes and there’s no easy way to programmatically paint. That’s not what the scripting support is meant for in Krita.

---

<div class="post-metadata">

**Author:** ![raghukamath](https://krita-artists.org/user_avatar/krita-artists.org/raghukamath/32/59144_2.png) [@raghukamath](https://krita-artists.org/u/raghukamath)\
**Post date:** [April 27, 2023, 3:15am UTC](https://krita-artists.org/t/new-user-with-questions-about-programming-with-krita/64291/3 "2023-04-27T03:15:30Z")

</div>

There was a merge request for expanding the API to draw programtically. Although I don’t know if it had brush support

> **[Python Painting API (!1435) · Merge requests · Graphics / Krita · GitLab](https://invent.kde.org/graphics/krita/-/merge_requests/1435)**
>
> This merge request is based on a previous merge

---

<div class="post-metadata">

**Author:** ![TheTwo](https://krita-artists.org/user_avatar/krita-artists.org/thetwo/32/32836_2.png) [@TheTwo](https://krita-artists.org/u/TheTwo)\
**Post date:** [April 27, 2023, 4:26am UTC](https://krita-artists.org/t/new-user-with-questions-about-programming-with-krita/64291/4 "2023-04-27T04:26:42Z")

</div>

> [@oscar\_adalid](#):
>
> it is possible to program brushes with scripts

KRITA does not support doing this now. You can refer to this post:

> [@\[Appimage\] Scriptable Brush v0](https://krita-artists.org/t/appimage-scriptable-brush-v0/46716):
>
> This is a follow-up of I have made an Appimage: md5sum: e4bc668c09c77c08f0d56e07706bd7e5 sha256sum: d8a108347efb19494883dbce0ec4929b5ab49efbdfbc994193af074984866100 Important This is just a prototype to test the idea and Lua vs Python. Nothing is really fixed. Do NOT use it for production The Lua scripts may or may not be saved properly. Back up your scripts! How to Use Edit a brush with pen settings (i.e. pressure, tilt etc). You will see a new ‘Lua’ entry in pen settings, enable it …

> [@\[proof-of-concept\] Scriptable Brush](https://krita-artists.org/t/proof-of-concept-scriptable-brush/46634):
>
> [[Lua Scripted Brush for Krita] ](https://www.youtube.com/watch?v=tsJpEM-9au8)Explanation This is a quick experiment that I did for fun. It demonstrates a way of making scripptable brushes via Lua. In the video I played with drawing speed and drawing angle. I’d really wanted to use pressure, but I don’t have my tablet with my dev environement frowning I chose Lua because it’s simpler to embed in C/C++. I hacked the pixel engine by adding a new “dynamic sensor”, which exposes other sensor values and run a lua script to calcu…
