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

Default cacheMode() for QGraphicsSvgItem causes items to be pixelated when saved to SVG file via QSvgGenerator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 4.7.3
    • SVG Support
    • Qt 4.7.3, PySide 1.0.2, Python 2.6, Mac OS X 10.5

    Description

      The documentation for QGraphicsItem (the base class for QGraphicsSvgItem) states that their default cache mode is NoCache. Yet QGraphicsSvgItems actually have a default cache mode of DeviceCoordinateCache. This causes QGraphicsSvgItems to be pixelated when saved to SVG files via QSvgGenerator. The resulting SVG files are, unfortunately, not scalable. In contrast, setting the items' cache mode to NoCache results in SVG files composed of scalable vectors, as one would expect for SVG files.

      Ideally, the cache mode of a QGraphicsSvgItem would be ignored when it was being rendered to a QSvgGenerator paint device. Then a cache mode of DeviceCoordinateCache would ensure that SVG items were cached when rendered to a QGraphicsView, but not when saved to an SVG file.

      Attachments

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

        Activity

          People

            kkalland Kim Motoyoshi Kalland (Inactive)
            jcbriar JC Briar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes