Rendering parts of svg-file in QML
I am trying to draw parts of an svg-file in QML. The file is svg-cards.svg and can be obtained from "here":http://svg-cards.sourceforge.net/
The cards are inside an SVG-group but when I try to use a single cards in qml image-element like this
It shows the whole SVG-file with all the cards in it. Is it even possible to use the SVG-files like this in QML. I know that I can do this in Qt with QGraphicsSvgItem.
AFAIK you can't do this with Image element. You should subclass "QDeclarativeItem":http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeitem.html to provide your custom QML element.
I might just do the cropping of the cards and save them to different .png-files. Are there any differences in performance when rendering png and svg -files?
PNG should be much faster :-)