[Kde-games-devel] KSVGRenderer::render seems to ignore image size
Andreas Pakulat
apaku at gmx.de
Thu Jan 31 00:11:39 CET 2008
Hi,
here's another problem I don't quite understand. Consider the following
snippet:
QImage img = QImage( s, QImage::Format_ARGB32 );
img.fill( qRgba( 0, 0, 255, 0 ) );
QPainter p( &img );
r->render( &p );
p.end();
Where s is a QSize of 145x204 and r is a KSVGRenderer initialized to
carddecks/decks/deck28_oxygen.svgz.
The resulting QImage has the right size, but the backside is somehow
rendered very tiny in the upper left corner of the image. Not properly
scaled by KSVGRenderer to the full size of the QImage.
I don't quite understand why that happens, the code for the frontsides
is essentially the same, except I'm calling KSVGRenderer::render(
QPaint*, const QString& id ) instead. And that works fine.
Andreas
--
You are standing on my toes.
More information about the kde-games-devel
mailing list