[Qt-interest] Changing color in SVG

Jason H scorp1us at yahoo.com
Thu Mar 3 15:34:46 CET 2011


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/bc6b3718/attachment.html 


More information about the Qt-interest-old mailing list