Transformation issue

Dmitry Kazakov dimula73 at gmail.com
Mon Dec 31 04:31:12 UTC 2012


> I stuck there. Does anyone have an idea what might go wrong?
>

Two ideas, not sure they may help though:

1) Does the resolution of the svg loads correctly to the image.{x,y}Res?

2) The QTransfrom::scale/translate methods sometimes may work a bit
unexpectedly. Probably, you could try:

matrix = QTransform::fromScale(image->xRes(), image->yRes()) *
QTransform::fromTranslate(shape->position().x(), shape->position().y());

or

matrix = QTransform::fromTranslate(shape->position().x(),
shape->position().y()) * QTransform::fromScale(image->xRes(),
image->yRes());

or

matrix = shape->absoluteTransformation(0)  *
QTransform::fromScale(image->xRes(), image->yRes());


-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20121231/a0410fdb/attachment.html>


More information about the kimageshop mailing list