[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Repaint patch for krdc / QPainter drawImage problem
From:       Urs Wolfer <uwolfer () kde ! org>
Date:       2008-08-24 8:43:15
Message-ID: 200808241043.16070.uwolfer () kde ! org
[Download RAW message or body]

On Sunday 24 August 2008 00:55:53 Guillaume Pothier wrote:
> Hi Urs and all,
> Here comes a small patch for krdc that only performs a partial repaint
> of the window when only a part of the window is dirty. The most
> notable effect of this patch is that in fullscreen mode with scaling
> enabled, the floating toolbox animates in and out smoothly (before the
> patch this was painfully slow as the whole screen was repainted at
> each animation step).

Looks like a good idea.

> Now, I have a Qt question. I was trying to simplify the painting code
> in krdc by using the QPainter::drawImage(QRect target, QImage img,
> QRect src) method, but this creates horribly distorted results when
> the target and source rects are of different sizes. Is that a known
> issue in Qt? I tried transforming the image into a QPixmap and using
> drawPixmap instead, and there is no distortion but the scaling isn't
> smooth and it is of course very slow when I want to paint only
> portions of the image.

I have also noticed this issues some time ago. Results were unusable... That's 
why I have to scale the image manually. Not sure if this is a bug or 
intentional.

Probably you could prepare a testcase and submit this to:
http://www.trolltech.com/developer/task-tracker

> I was about to send a screenshot of the
> distorted results but I don't know if the list accepts attachments?

Small attachments are accepted IIRC.

Bye
urs
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic