Qt SVG renderer

James Richard Tyrer tyrerj at acm.org
Mon Aug 4 21:09:11 BST 2008


Thiago Macieira wrote:
<SNIP>
> I have found someone in the office who seemed interested in fixing issues. He 
> has, however, no more clue than I do about the filters and blurs. So we cannot 
> promise anything for the time being, other than fixing the blatant problems.
> 
Perhaps I can help and save you the time Googleing and studying SVG syntax.

A filter is something that takes an SVG "path" and modifies it before it 
is displayed.

For example:

   <filter id="DropShadow">
     <feGaussianBlur in="SourceAlpha" stdDeviation="3" result="DSBlur"/>
     <feOffset in="DSBlur" dx="4" dy="4" result="FinalDS"/>
   </filter>

Also, this is what we most need to have rendered correctly by Qt.

What the above does is first blur the "path" and then move it slightly 
down and to the (your) right.  If the starting path is a Black (000000) 
outline of the icon with 75% opacity, it produces a nice drop shadow for 
a 128x128 pixel SVG file (you could use it in other file sizes by 
scaling the constants).

This is contained in the attached file (added by hand with a text 
editor).  If you view this in Squiggle or the Adobe SVG plugin (which no 
longer works in Linux) you will see a blurred drop shadow.  This is what 
we most need Qt to render correctly.

-- 
JRT


-------------- next part --------------
A non-text attachment was scrubbed...
Name: empty.svgz
Type: application/octet-stream
Size: 1565 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080804/d3bae625/attachment.obj>


More information about the kde-core-devel mailing list