Finishing a paint action.

Boudewijn Rempt boud at valdyas.org
Wed Oct 8 21:51:36 CEST 2003


Passing lightly over the issue of debug commands -- one thing at a time -- is 
this right way of painting? I mean, is it necessary to first 'anchor', then 
'invalidate', then 'updateCanvas' to have the change show up on screen?

   KisImageSP img = m_view -> currentImg();
    if (img) {
        KisPaintDeviceSP device = img -> activeDevice();
        if (device) {
            KisPainter *p = new KisPainter();
            p->begin(device);
            p->fillRect( x,  y,  10,  10,  KoColor(QColor( "red" )) );
            p->end();
            device->anchor();
         }
    }
    img -> invalidate(QRect( x,  y,  10,  10 ));
    m_view -> updateCanvas(x,  y,  10,  10);

(By the way, in the funny bugs department, and just for the record: if I run 
krita remotely, on my AMD box, export the display to my Powerbook, then the 
image will show up as black, and I get xshm errors on the output. I hope to 
compile Krita on the powerbook some time soon to check for endianness, but I 
don't think this is an endiannes problem.)

-- 
Boudewijn Rempt | http://www.valdyas.org/index2.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: signature
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20031008/3395d546/attachment.bin


More information about the kimageshop mailing list