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

QSvgRenderer::render does not render in the rect specified

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.1, 5.15.0 Alpha
    • 5.14.0
    • SVG Support
    • None
    • Windows
    • acb66cad2280bda20d26d08d606a66b9660b17aa (qt/qtsvg/5.14)

    Description

      From 5.14, QSvgRenderer::render(QPainter *painter, const QRectF &bounds)

      does not render in the bounds specified. 

      This due to the correction made in QSvgTinyDocument::mapSourceToTarget for 

      QTBUG-79933.

      The example attached was working well with Qt 5.13.1 and all previous Qt releases from 4.7. With Qt 5.14, it works only if we remove the size and width attributes of the svg text. But most of svg files have a width and height specified.

      Attachments

        1. main.cpp
          0.6 kB
        2. SvgRendererBug.pro
          1.0 kB
        3. Widget.cpp
          1 kB
        4. Widget.h
          0.7 kB

        Issue Links

          Activity

            People

              vgt Eirik Aavitsland
              Hugh Bellemare Hugh Bellemare
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: