Getting the region from a paint device

Boudewijn Rempt boud at valdyas.org
Sun Jan 7 13:07:46 CET 2007


On Sunday 07 January 2007 12:51, Boudewijn Rempt wrote:
> On Sunday 07 January 2007 11:05, Bart Coppens wrote:
> > Well, it's possible, and probably easy, too. But probably not very fast,
> > since we use a (homegrown) hashtable, we'd have to iterate over each
> > bucket, and then iterate over each chain. Probably not too much of an
> > issue, but still.
>
> Okay... I was hoping to use it to speed up composition by working only on
> the intersection of the region with real tiles & the composition region.
> But if it's going to be slow it may not be worth it.

Casper said on IRC:

12:57] <boemann> boud regarding the region for used tiles - it's not going to 
be slow just because it's a homegrown hash
[12:58] <boud> boemann: then it may be worth it, especially now that a lot of 
krita operates on regions instead of rects anyway.
[12:58] <boemann> yeah
[12:59] --> shnee has joined this channel 
(n=CurtyD13 at cpe-24-26-131-198.columbus.res.rr.com).
[12:59] <boemann> boud I fully support the idea
[12:59] <boud> It seems as if Qt4's region class is pretty good & pretty 
efficient.
[12:59] <boud> I'll put it on the todo then :-)
[13:00] <boud> And we'd better make the inherited method private in 
KisSelection
[13:01] --> _cm_ has joined this channel 
(n=_cm_ at pD95FB596.dip0.t-ipconnect.de).
[13:03] <boemann> that stuff about kisselection - be careful as astan right 
before christmas fixed a problem you created in 1.6
[13:03] <boud> I'll check the commit logs for that -- I don't remember it.

So, I've added it to the TODO and will commit a simple implementation in a few 
minutes (like, QRegion region() { return QRegion(extent()); } -- I will have 
to leave it to the hashtable mavens to actually implement this correctly!
-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20070107/62ae14fc/attachment.pgp 


More information about the kimageshop mailing list