Results 1 to 2 of 2

Thread: Text clipped when rendering svg.

  1. #1
    Join Date
    Apr 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Text clipped when rendering svg.

    Hi,

    I am attempting to display some SVG, generated by GraphViz dot, and some of the text is being clipped.
    The text within boxes and ellipses displays fine.
    The text on arcs is also OK unless the arc is nearly horizontal. It appears that text is clipped by a rectangle that surrounds the arc.
    To do the displaying I am parsing the SVG/XML and creating an instance of a subclass of QGraphicsSvgItem for each object. I am doing this way so that I can get mouse events from the individual objects.

    Does anyone know how I can influence the clipping area for a QGraphicsSvgItem ?

    I am using Qt 4.6.2 on Fedora Linux 11.

    Thanks
    Brenton

  2. #2
    Join Date
    Apr 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Text clipped when rendering svg.

    OK, replying to my own question.

    It appears that this relates to a known Qt bug - QTBUG-2002
    The problem is that deep inside QSvgGraphics there is a class QSvgText which is responsible for displaying text. It does not recalculate the bounds - the function is simply commented out.

    Brenton

Similar Threads

  1. Text Edit rendering
    By VirtualRealty in forum Qt Programming
    Replies: 2
    Last Post: 1st October 2010, 18:16
  2. 2D OpenGL text rendering with existing app
    By bytebucket in forum Newbie
    Replies: 7
    Last Post: 11th March 2010, 21:28
  3. Replies: 2
    Last Post: 20th September 2009, 03:59
  4. text rendering problem
    By vno4697 in forum Qt Programming
    Replies: 0
    Last Post: 12th August 2008, 15:44
  5. QPainter clipped?
    By nikita in forum Qt Programming
    Replies: 2
    Last Post: 24th September 2006, 13:29

Tags for this Thread

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.