Fading Memories

About

Ramblings about books and other things that will soon fade from my memory.

Boudewijn Rempt

index | rss1.0

Check out my sculpture website: www.boudewijnrempt.nl.

There's more...

Creative Commons License
The original artwork is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

Roundabout through identi.ca

    follow me on Identi.ca

    Categories, too

    Find


    Archives

    Other things here at valdyas.org

    2004-09-09

    Hacking on selections

    Good progress today... I discovered yesterday that I had about ten more holidays left than I thought the day before yesterday, so I took two days off to hack on Krita. (Pity I didn't know earlier, or I'd had been able to go to either aKademy or to the monastery in Hemelum -- both equally attractive propositions.)


    Today I got the selection code factored out of the humongous KisView class. If there's one thing I dislike about Qt coding, it's the tendency to have a View or Window class that's unmanageable because all actions, signals & slots are tied together in that single place. KisSelectionManager takes care of everything associated with selecting, cutting and pasting, and one day I'm going to do the same for the other chunks of functionality in KisView, such as the layer handling. Small is beautiful. Small classes, small packages.

    Apart from that internal refactoring which users won't see, I've gotten select all, deselect and invert selection to work properly, done the enabling/disabling of selection actions and added actions for all the cool things you know you want to do with selections, like growing, feathering and all that.

    Now I just need to implement all those actions, fix the selection tools, make selection-aware iterators, fix blitting so only selected pixels are blitted and link the selection to its layer. And implement loading/saving of selections.

    Krita selections, by the way, are not your old-fashioned marching ant selections, but closer to Gimp and Photoshop masks, except that I understand what they do. I feel that Krita's selection are pretty intuitive and easy to handle. And it's a win that I didn't have to figure out how to let ants march along the edges of a discontinuous selection represented by a bytemap.