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

List:       kde-devel
Subject:    Re: Zooming an Image
From:       Rob Kaper <cap () capsi ! com>
Date:       2001-05-28 8:00:46
[Download RAW message or body]

On Mon, May 28, 2001 at 04:45:37PM +0900, Oh Jin Suk wrote:
> I want to write image viewer program, Now I implemented to show an image,
> and want to add zooming action. but I found that I could not find how to
> zoom in and zoom out. Is there anyone who tells me how I can write zooming
> an image

Have you tried QImage::smoothScale and/or QPainter::scale ??

http://doc.trolltech.com/qimage.html#e79ef9
http://doc.trolltech.com/qpainter.html#fc599c

(not sure whether that gives _nice_ results, but scaling an image to double
its size while keeping the view area the same size should effectively create
a zoom effect)

Rob
-- 
Rob Kaper     | 'What? In riddles?' said Gandalf. 'No! For I was talking
cap@capsi.com | aloud to myself. A habit of the old: they choose the wisest
www.capsi.com | person present to speak to; the long explanations needed by
              | the young are wearying.' - "Lord of the Rings", JRR Tolkien
 
>> Visit http://master.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