GSoC/GCI Archive
Google Code-in 2010 KDE

Create a Simple Mixing Brush, Stage 1

completed by: Natan Yellin

mentors: Pentalis


Krita is a KDE program for sketching and painting, offering an end–to–end solution for creating digital paintings.

In Krita, brush engines are known as 'painting operations' or paintops for short. Each paintop is a plugin, a piece of code that's not fundamental to build Krita, but can be added for extra functionality (in this case, the extra functionality is a new brush engine).

Historically, Krita is missing a mixing brush, the closest to color mixing in the current collection of brushes is the smudge brush.

In this epic journey, your mission is to put an end to this lack of a mixing brush, one task at a time. This 'campaign mode' task is divided in several stages such that others can continue if the first contributor leaves, and to let you claim credit for several tasks if you complete the whole campaign.



***You must complete this task before you can claim any task in this campaign***

Mission: Get Krita to build on your computer.


You need a working GNU/Linux install in your computer.



Stage: 1

Mission: Create a new paintop that compiles.

Instructions: The easiest way is to clone a preexisting paintop, and that's what we're going to do. Use the chalk brush paintop as a basis, and apply the power of 'sed' (start with 'man sed') for massive search and replace. You can also do it with a good old "search and replace" file by file. If in doubt, ask mentor for cheat codes (premade scripts... don't ask for them before trying yourself!).

Always remember to add and remove the relevant entries in the CMakeLists.txt.

Step by step guide:

--Add a new folder in the /src/koffice/krita/plugins/paintops/ directory with the name of your new paintop, copy the contents of the ./chalk/ brush into it.

--Read /src/koffice/krita/plugins/paintops/CMakeLists.txt , notice that every folder to be built (compiled) is included after the 'add directory' keyword.

--Add your own folder to said file.

--Carry out a search and replace in every file of your clone, replacing 'chalk', 'Chalk' and 'CHALK' with your new paintop's names (for example 'chalk' to 'mixing', 'Chalk' to 'Mixing' and 'CHALK' to 'MIXING').

--Go to the build directory, /build/koffice/krita/plugins/paintops/ and perform a 'make install', note that sometimes your changes won't display immediately. Don't despair, do a 'make clean' first and then 'make install'.

--Make and make install invoke CMake, the build tool used by KOffice to compile and link itself. In other Linux applications, make, and make instal do different things (they don't invoke CMake), so please keep that in mind. In the context of Krita, when someone tells you to "compile" or "build", he surely means to use make (and make install, otherwise you are not installing what you compiled and you will not see changes).

--If you are confused consult your mentor. Reading in Wikipedia about terms you don't understand helps too. There is information about everything out there, go and fetch it. will help you if you have troubles understanding C++ (check the tutorial).

IRC channel: #Krita at