[Qt-interest] Changing color in SVG
Chitrang Srivastava
chitrang.srivastava at gmail.com
Thu Mar 3 17:18:56 CET 2011
Thanks ,
I just have to change the color of text in SVG image based on some action.
So I guess this scheme work well for me.
Thanks,
On Thu, Mar 3, 2011 at 8:04 PM, Jason H <scorp1us at yahoo.com> wrote:
> No, this unfortunately is a short coming of Qt. It is however not as bad as
> you might fear.
> You can load the SVG into a DOM parser (or skillfully crafted regexp) and
> replace the value in the file (desination is a QBuffer) and feed into the
> SVG routines.
>
> This work well in most cases, but falls short on color animation. In order
> to do that, you have to separate the color-animated parts into their own
> painter or graphics objects, and change the color that way, and
> move/transform them together.
>
>
>
>
> ------------------------------
> *From:* Chitrang Srivastava <chitrang.srivastava at gmail.com>
> *To:* qt-interest at trolltech.com
> *Sent:* Thu, March 3, 2011 7:01:38 AM
> *Subject:* [Qt-interest] Changing color in SVG
>
> Hi,
>
> I have a SVG file which contains some text. I want to change the color of
> that text on some user action.Is this possible i.e. "Changing color of text
> inside SVG file when it is already loaded by an application".?
>
> Thanks,
> Chits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110303/3312f9ef/attachment.html
More information about the Qt-interest-old
mailing list