[Okular-devel] playground/graphics/okular

Tobias Koenig tokoe at kde.org
Wed Oct 25 17:56:16 CEST 2006


On Wed, Oct 25, 2006 at 03:35:56PM +0000, Tobias Koenig wrote:
> SVN commit 599058 by tokoe:
Hi,

> A rather big change:
> 
>  * Hide as much private API as possible in Generator, PixmapRequest and ExportEntry/Format
>  * Renamed ExportEntry to ExportFormat and made it value based
>  * Removed canExportToText() and exportToText() from Generator API and implemented this
>    functionality in exportFormats()/exportTo() in the generators
>  * Removed the orientation parameter from PixmapRequest and let the Document handle the rotation
>    of the page (pixmap) instead
Some additional comments:

The rotation code isn't finished yet, in the current implementation I
added a new method Page::setImage( int id, const QImage& ), which is
meant as an replacement for Page::setPixmap() and should be used by all
Generators (didn't ported them yet though, want to here your comments
first).

When the image is set via setImage(), a pixmap for the current rotation
state is created and stored in m_pixmaps. If Page::rotateAt() is called,
all entries of m_pixmaps will be recreated from their corresponding
entries of m_images with the current rotation state.

This solution allows us to keep the m_pixmaps variable untouched, so
PagePainter need not to be adapted.

For the moment I've hacked Page::setPixmap() to call Page::setImage(),
so that all Generators use setImage implicitely. That causes an
additional QPixmap->QImage conversion, however as soon as all Generators
are ported to use setImage() (an 1.5 hour job), this bottleneck is gone as well.

One thing I'm not sure about is whether the generation of the rotated
pixmaps should be put into a thread to make it asynchronous. I tested
the current code on my 500MHz machine and it blocks only for a half
second during convertion, so maybe that's not such a big issue...

What must be done else?:
  * rotating the objects
  * ?

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/okular-devel/attachments/20061025/4d5a270b/attachment.pgp 


More information about the Okular-devel mailing list