[Qt-interest] QtSvg rendering icon problem
Jason H
scorp1us at yahoo.com
Tue Aug 23 16:59:23 CEST 2011
Qt Only support SVG Tiny profile. Is that it?
A picture would help.
________________________________
From: franki <franki at franki.eu.org>
To: "qt-interest at qt.nokia.com" <qt-interest at qt.nokia.com>
Sent: Tuesday, August 23, 2011 10:53 AM
Subject: Re: [Qt-interest] QtSvg rendering icon problem
Dnia wtorek, 23 sierpnia 2011 o 16:11:32 Jason H napisał(a):
> Sounds right to me, based on the center point. Try changing your transform
> origin to be (200,200)
I'm not sure if I made myself clear, but I did other tests and I have this
problem only when I'm using svg file with multiple icons in one file (by
settings setElementId in QGraphicsSvgItem).
So again problem is that I have 200x200 icon which is mostly transparent
layer, and only in the center of this square is small circle (radius 50) filled
with color, when I create QGraphicsSvgItem from svg file with setElementId set
for this icon, circle from the center of the square is rendered in top-left
corner, and it should be rendered in the center.
But I've just tested icons in separate svg files (one icon, one svg file) and in
that case everything is fine, which means small circles are rendered in the
center of transparent icon.
So maybe something is wrong with this svg file with multiple layers (multiple
icons in one file) but on the other hand it is rendered well in other viewers.
best regards
Marek
>
>
>
>
> ________________________________
> From: franki <franki at franki.eu.org>
> To: qt-interest at qt.nokia.com
> Sent: Tuesday, August 23, 2011 10:03 AM
> Subject: [Qt-interest] QtSvg rendering icon problem
>
> Hi all,
>
> I have 200x200 pixel item which is picture in svg. Most of this picture is
> transparent alpha channel, only in the center of the picture there is
> circle with radius 50px, filled with color. When I create
> QGraphicsSvgItem from that file, centered circle (with radius 50) is drawn
> in top left corner instead of the center, as if some kind of alignment
> were applied inside this 200x200 square.
> If I convert this svg into png file, and then I create QGraphicsPixmapItem,
> everything is OK, I get 200x200 square with circle drawn in center of the
> pixmap.
>
> So It looks to me as if it was problem with rendering picture from svg file
> format. Does anybody had a similar problem? Same picture rendered in any
> graphic viewer is displayed properly. Some bug maybe? I'm using Qt 4.7.3 on
> Linux platform.
>
> best regards
> Marek
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110823/650dfedb/attachment.html
More information about the Qt-interest-old
mailing list