[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Make KPresenter draw a page using w/h pixel values instead of zoom
From: Karl-Heinz Zimmer <khz () kde ! org>
Date: 2004-01-13 0:10:04
Message-ID: 200401130110.10929 () postmaster ! bugcops ! org
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
looking at kpresenter/sidebar.cc I just found something quite
strange in the method
QPixmap ThumbBar::getSlideThumb(int slideNr) const
1. the page is drawn at zoom level 60% into a pQPixmap
view->getCanvas()->drawPageInPix( pix, slideNr, 60 );
2. then the pixmap is scaled (or stretched. resp.) to the desired
size of 120x130 or 130x120 or 130x130 pixels
OK, next in kozoomhandler.cc the respective method
void KoZoomHandler::setZoomAndResolution( int zoom,
int dpiX,
int dpiY )
to me looks like there actually is no way to achieve output
with different zoom levels for x and y.
Now my problem is: We would like to do the same as is done in
QPixmap ThumbBar::getSlideThumb(int slideNr) const
but we want the resulting pixmap to be very exact: so no way to
use that hack
const QImage img(pix.convertToImage().smoothScale( w, h,
QImage::ScaleMin ));
pix.convertFromImage(img);
We just want KPresenter to render directly into several of our
desired target sizes, which will be 640x480, 704x576, 800x600, ...
The reason for this is: automatically generate output pixmaps
for a small independent presentation viewer app my son and I
are developing as an exercise...
Therefor we need high-quality slide pixmaps in different
given sizes - stretching the pixmap /after/ rendering is
suboptimal and would result in KPresenter generated slide
images look worse than OpenOffice Impress generated ones
- something I would rather not want to see happen. ;-)
TIA !
Karl-Heinz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
iD8DBQFAAzdhCcaVnbvggDcRAm2CAJ4/q3eYlg0Hpe5nFcjNOze44QfjIwCg1efw
D23VFCNRWLIHaP3AGebgOXw=
=Nipp
-----END PGP SIGNATURE-----
_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic