Qt SVG renderer

Richard Dale rdale at foton.es
Mon Aug 4 10:32:05 BST 2008


On Friday 01 August 2008 21:26:58 Riccardo Iaconelli wrote:
> Il Tuesday 29 July 2008 08:57:29 Thiago Macieira ha scritto:
> > I see a few blatant errors in some errors that look like the icon was
> > drawn on top of others. If those are Qt errors, those should be easy to
> > fix. But please check that it isn't the generating program's fault.
>
> Sorry for stepping in this discussion just now but I haven't seen this
> thread until pinheiro told me about it today, which is kinda fun because
> it's all about some icons I generated, and I didn't know about its
> existence. :-)
>
> To answer to the junk problem (I'm going through the thread now), it's very
> unlikely that it's my program's fault, because it rendered just one icon at
> time, and it was called via system() (so I guess no ruby cache weirdness
> too) by a loop equivalent to the bash:
>
> for file in $(ls *.svg)
> do
>    convertblabla $file
> done
>
> So I'm pretty confident it's not my script...
> However, that looked pretty weird indeed, no clue what could be. :\
Yes, it was the script in the end! See Maksim Orlovich's comment when he 
pointed out that a fill() call was needed to initialize the QImage, after 
creating it. When I added that, both Ruby and C++ versions of the code worked 
fine.

    pic = Qt::Image.new(256, 256, Qt::Image::Format_ARGB32_Premultiplied)
    pic.fill(0)

-- Richard





More information about the kde-core-devel mailing list