Qml as a vector source for printing.



  • Hi All,

    I'm just wondering whether it's possible to either render a declarative item at a higher resolution, or even as vector elements.

    I've tried for example using a QPrinter to print a QDecalarativeView's scene, however while elements manually added to the scene such as text are rendered as vector art, declarative items are rasterized at screen resolution.

    Any ideas?





  • Thanks sergeev, but that's unfortunately unrelated.

    I've been digging in the various qml element implementations and they're mostly using QPainter primitives, so it should be possible - but I'm guessing something in qml's declarative item hierarchy is perhaps caching to a bitmap thanks to optimizations.



  • Hi,

    Ultimately almost all of the painting in the QML graphical elements is cached into pixmaps for performance reasons. This is done in the elements themselves (have a look at QDeclarativeRectangle::generateBorderedRect(), for example), so I can't think of an easy way to get around this without hacking all of the elements, or writing your own set of vector-based elements.

    Regards,
    Michael


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.