PDA

View Full Version : QGraphicItem with vector graphic



jobrandt
3rd September 2007, 14:21
drawImage can be used to draw pixmaps to draw pixmaps to a scene.
QImage only supports pixmap formats like png,jpg,bmp...
Is it possible to use vector graphic formats?
I would like to load and display vector graphics like i can do with pixmaps.
The advantage of the vector graphic is that you can zoom the elements better.

marcel
3rd September 2007, 14:24
You can load a svg with QGraphicsSvgItem, but I am not sure if it preserves the lineart or if it renders the document as raster.

Anyway, interacting with the objects in the svg is out of the question.

Regards

jobrandt
3rd September 2007, 14:41
Yes, i have also thought about SVG. But the problem is that i have pictures in a different file format(autosketch). Do you know any converter programs?

marcel
3rd September 2007, 14:52
No, but that's not a complex format.
You should write your own converter/plugin. And you could translate it directly to graphics items.

But first see if ImageMagick has some support for it. You could look how they do it.

Regards