zooming an SVG image
Unsolved
QML and Qt Quick
-
Hi,
An SVG image is scalable and hence, when zooming in, I should still be able to see a crisp sharp image.
I first tried the following:Image { id:svgImage anchors.fill: parent fillMode: Image.PreserveAspectFit source: "./pentathlon.svg" smooth: false scale: 1.0 transformOrigin: Item.Top //sourceSize.height: parent.height*scale //sourceSize.width: parent.width*scale MouseArea { anchors.fill: parent onClicked: svgImage.scale *= 2 } }
This scaled fast but after a few clicks, the image was pixelated.
When uncommenting the twosourceSize
lines, the image remained sharp but at the expense of a lot of memory and CPU.Is there a way to limit memory usage/CPU consumption without sacrificing sharpness?
Thanks in advance,
Marc