PDA

View Full Version : QSvgRenderer fill rule always evenOdd with gradient



mr.costa
24th April 2007, 17:04
Hello. I am not sure if this is a bug.

QSvgRenderer makes evenOdd fill if the shape has a gradient, but the shape fill-rule is explicit nonZero. Inkscape and KSVG 3.5.6 shows it OK. The code look as:



QSvgRenderer svg( source );
QImage img( 128, 128, QImage::Format_ARGB32 );
img.fill( 0 );
QPainter p( &img );
svg.render( &p );
QImage img2 = img.convertToFormat(QImage::Format_ARGB32, Qt::AutoColor| Qt::AvoidDither);
img2.save( destination );


I attach the svg (as .gz because svg is not allowed) and the resulting png.