Results 1 to 1 of 1

Thread: QSvgRenderer fill rule always evenOdd with gradient

  1. #1
    Join Date
    Mar 2006
    Posts
    7
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Unhappy QSvgRenderer fill rule always evenOdd with gradient

    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:

    Qt Code:
    1. QSvgRenderer svg( source );
    2. QImage img( 128, 128, QImage::Format_ARGB32 );
    3. img.fill( 0 );
    4. QPainter p( &img );
    5. svg.render( &p );
    6. QImage img2 = img.convertToFormat(QImage::Format_ARGB32, Qt::AutoColor| Qt::AvoidDither);
    7. img2.save( destination );
    To copy to clipboard, switch view to plain text mode 

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.