Results 1 to 4 of 4

Thread: QGraphicItem with vector graphic

  1. #1
    Join Date
    Feb 2007
    Posts
    28
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QGraphicItem with vector graphic

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicItem with vector graphic

    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

  3. #3
    Join Date
    Feb 2007
    Posts
    28
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QGraphicItem with vector graphic

    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?

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicItem with vector graphic

    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

Similar Threads

  1. identify QGraphicItem
    By avis_phoenix in forum Qt Programming
    Replies: 5
    Last Post: 24th September 2007, 06:16
  2. QGraphicItem mouse click detection
    By PrimeCP in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 11:35
  3. Location of QGraphicItem!!
    By rachana in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2007, 21:20
  4. need help with QGraphicItem
    By rachana in forum Qt Programming
    Replies: 13
    Last Post: 30th January 2007, 06:27

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.