TODO lists

Boudewijn Rempt boud at
Tue Feb 1 09:57:19 CET 2005

On Tuesday 01 February 2005 00:00, Michael Thaler wrote:

> Once the code uses the iterators directly, it shouldn't be too hard to make
> it take selections into account, isn't it?

No, except that you also need to iterate over the selection layer at the 
moment, since the selection status is not filled in in the pixel iterators. 
And you need to be a bit careful: I thought that it would be enough to bitBlt 
the selection onto the alpha channel of the paint device to remove all 
unselected pixels, but it's a bit more complicated when you've got pixels 
that are not completely opaque in the layer.

I'm working on a couple of utility functions that make this a bit easier, 
because it's often just as easy to do things like:

* For filling (with colour, gradient, pattern)
        - create a temporaty paint device
	- fill a rectangle the extent of the selected area with the specified
	- Apply the selection to the temporary paint device
	- Blt the temporary paint device to the active layer with the specified

* For scaling:
	- create a temporary paint device
	- copy the selected rect from the active layer to the paint device
	- apply the selection to the temporary paint device
	- scale the temporary paint device
	- blit the temporary paint device back on the active layer with the 
	  specified opacity.

For filtering the same might apply, or it might be easier to just iterate over 
the layer and the selection.

In any case, it should be very useful if there were a method to "clone" a 
rectangular subsection of a layer as fast as possible. That can't be hard, 
can it, Casper?

> I just tried the selections and right now they don't seem to work, at least
> for me.

I thought I had fixed them, today. There's still work to be done: the mask 
colour must be definable in the option tab for the selection tools and there 
are a number of interesting dialogs and functions to be implemented (like 
select-by-color), but I got cutting, copying, pasting and moving working 
again by 13:22 CET yesterday.

Boudewijn Rempt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the kimageshop mailing list