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

List:       kde-kimageshop
Subject:    Re: Transformation issue
From:       Sven Langkamp <sven.langkamp () gmail ! com>
Date:       2012-12-31 14:24:27
Message-ID: CAAmsBf=yGvQhgr3ZvermB0-xc3vmCR23Eognx7N=a4Qg0JasRw () mail ! gmail ! com
[Download RAW message or body]

On Mon, Dec 31, 2012 at 5:31 AM, Dmitry Kazakov <dimula73@gmail.com> wrote:
>
>> 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?

It's correct.

> 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());

This was the problem. I works with shape->absoluteTransformation(0) *
QTransform::fromScale(image->xRes(), image->yRes())
Thanks
_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic