Artifacts at image boundaries when scrolling QGraphicsview
-
Part of a Graphics Scene I am making is a set of tiled images that should line up perfectly, and normally do. However when scrolled (by drag only: it doesn't do it with the scrollbar) artifacts are visible at the borders of each tile. There are thousands of tiles and the overall area is not at all rectangular so rendering as one image isn't very practicable.
How can I eliminate these artifacts?
Tiles are 128px square and the code laying out the tiles is:
@
setRenderHint(QPainter::Antialiasing);
...
double sc = (1024/ 128); // #defines in code
for (TerrainTileList::const_iterator it = terrain->begin(); it != terrain->end(); ++it)
{
TerrainTile *tile = *it;
QPointF sxy = scaleTilesToMetres(tile->getPosition());
QGraphicsPixmapItem *terr = new QGraphicsPixmapItem(*tile->getImage());
terr->setPos(sxy);
terr->scale(sc, sc);
terrainGroup->addToGroup(terr);
}
@!http://pasteboard.s3.amazonaws.com/images/108iPpyQ.jpg(Artifact Tiles)!
-
Is this link any better?