This week of sponsored Krita development started with fix for bug 250621. I merged some of the brush engines as I promised at Akademy 2010. One of them is softbrush, which is now part of the default Pixel Brush. The merge also requested some new requirements. One of them was adding support for rectangular masks. They are probably not very used by artists when they paint, becausethey were quite buggy and we did not get any bug report about it. But hopefully we have developers, who test Krita and we found crash when the mask was rotated. I fixed it. I forgot to define the value of the rotated mask, so it crashed.
Next fix was for bug 242547,which was about corrupted masks in auto brush. When you rotated some mask, the result was corrupted. We added rotation first to Autobrush, then to Predefined brushes. It was implemented probably fast and old rotted code was still around causing some inconsistencies. Also the bug was caused by another code I was fixing. Preview computation was done by own way of rendering of the mask. I fixed it so that it reuse the code that brush is using when painting on canvas. Pixel brushes are using preview image in the architecture of brushes as base for the painting. So the base class set the width and height according the preview image, but mask brush called autobrush has different dimension, mask dimension. Problem is solved, fixed autobrush corruption.
Bug 245130 and bug 217124 are quite complicated as they require new composite operation. I enabled new version of the composite operation called COPY composite and it is used when you want to copy pixels as they are, from source to destination. It is needed for paintops that move pixels, but also in various parts of Krita. Cyrille added missing features like respecting the selection and respecting opacity needed for the fix. This composite operation was disabled by Sven from being user-visible, because it caused result, that was not usable much. It is not visible for layers and tools now. But we found new solution and some composite operations will be visible only for brushes that can make a use of them. In case of COPY – duplicate, deform and smudge can use them maybe as default operation but we did not find nice solution for it yet. In GIMP smudge does not allow you to use different composite operation.
I was working in my spare time on spray brush a little. I wanted to disable QImage brushes, but apparently Boud liked the workflow and I ended up with fixing the predefined brushes, because they were not respecting the HSV transformation done in color dialog. The workflow for professionals usually is different – they have a lot of brushes around. For casual user who wants to test spray brush and spray some image, the current workflow with QImage is much more faster. So it stayed for 2.3, but it will be changed for 2.4. Instead of one hour of programming I spent time on discussing the problem.But nice idea we produced by us with Boud – putting the QImage file dialog to custom brush.
I also fixed the color dialog in spray. Signed char was quite small for int. Also I used the new Krita’s slider there. I also commited some presets for Harmony project adoption in Krita I plan to blog about.
Back in work I fixed painting with dyna brush in our scratch pad. It was bug 231468 which was about non-working paintops in scratch pad. Scratch pad is small canvas without flake and other heavy-weight stuff. It is also without KisImage class and that is hard dependency for some brushes like duplicate. The bug was closed with ability for paintops to disable scratchpad.
Bug 244910 was about slow brushes in CMYK and when something is slow in Krita, I make it faster. CMYK is not widely tested as artists we have use RGB colorspace. Brushes were slow due to recreating color transformation in CMYK called HSV adjustment. HSV adjustment is RGB specific feature, so the pixels are converted anyway. The creation is now done once and brushes are usable again. Bug is fixed and closed. Though I noticed that HSV transformation is working on CMYK with filter but not with brushes. Sven commited working solution. Other paintops that use it have to be ported. When I cached the transformation, I forgot to delete them and I noticed also memory leak in Hairy brush for bristles. It is fixed.
Calligraphy strokes with dyna brush in Krita
Made with two-buttons and wheel button mouse
Bug 248695 was about outline of the dyna tool now showing. I made it different so that it can reuse freehand tool code and have all the features from the freehand tool and also the brush outline. I implemented the dyna tool so that user without tablet can draw with pressure or rotation. Dyna tool can provide this information from mouse movements. Now we have sensors and you can paint with different pressure e.g. from mouse speed and also rotation can be set to some drawing angle or fuzzy. But still Dyna tool has it’s use case not present in the sensors and that is calligraphy strokes. The simulation has physical background, is very simple and works nice but you have to master it a bit. It was proof of concept long time ago and I still find this tool a nice toy for painting.
I also worked on the bug in the move tool but Sven has taken over and fixed it. I did small research that might hopefully make it easier for Sven.
That’s it for week 37. The action plan III has many bugs fixed, but not just by me. Bugs are also fixed by regular contributors like Sven, Adam and Marc. Great job, Krita team! We are quite fast approaching the user-ready Krita!
My full-time sponsored contribution is heading slowly to it’s end. I have two weeks of bug fixing in front of me. On a personal note, I start my job career in company Ixonos Slovakia, but starting it in Finland for some period. I will most probably work on Linux/Qt/MeeGo stuff and even maybe some OpenGL based projects. I look forward!