Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-98139

QSvgRenderer::boundsOnElement does not properly calculate the bounding box of a text when it has a transformation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.3, 6.3.0 Alpha
    • 6.2.1
    • SVG Support
    • None
    • macOS
    • d180cb47b147ca07874b7defe1ed2771d5cb73fc (qt/qtsvg/dev) e7b2bd0dfa4f94189aea05aa5e575468776dbdba (qt/qtsvg/6.2)

    Description

      When calling boundsOnElement() on a text, it returns an invalid value when the SVG text uses a transformation instead of x and y

      In the attached example, there is three SVG groups, each one composed of a rectangle and two overlapping texts (a blue text that uses x and y and a black text that uses a transformation)

      Each element of a given group should have more or less the same bounds because they are all displayed at the same place. BUT text items that use a transformation have an invalid bounding box that does not match the one of the rectangle

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vgt Eirik Aavitsland
            lemortalexandre Alexandre Lemort
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes