[Qt-interest] Bug? Rendering artifacts with antialising and zooming of tiled pixmap backgrounds
Johannes Kleimola
johannes at kleimola.fi
Sun Nov 22 22:05:03 CET 2009
It seems that by setting the cacheMode of the viewport with
setCacheMode(QGraphicsView::CacheBackground) removed the artifact
problem as well. However, it would be nice to know why direct rendering
without caching caused such artifacts with antialiasing and zoomed
background (no problems when no zoom)...
A performance question: referring to the tiled scene implementation code
in this thread, is it better to store separate small pixmaps of tiles
and pass them to QPixmap or pass the QRect clipping area information to
QPixmap to render a single tile from a lage pixmap of tiles particularly
if the target environment is a mobile device (S60/maemo) and not a
powerful desktop?
Regards,
>> Johannes <<
Johannes Kleimola wrote:
>
> Hi!
>
> When constructing a QGraphicsScene with a customized background of
> pixmap tiles and doing zoom-in or zoom-out in the viewport, all
> QGraphicsItems that are moved around above the background and also the
> default rubberband selector leaves rendering artifacts on the tile
> boundaries if the setRenderHints(QPainter::Antialiasing) is set
> regardless of whether
> setOptimizationFlag(QGraphicsView::DontAdjustForAntialiasing) is
> disabled by default or by setting it to false. Removing the
> antialiasing renderhint removes the artifacts. Enabling
> QPainter::SmoothPixmapTransform causes artificats even without moving
> anything over the background. If the whole view is repainted due to
> e.g. minimizing and maximazing the window, the artifacts are gone. Is
> this a bug or a fault in my implementation logic?
>
>
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Qt-interest-old
mailing list