Quantcast
Channel: Jobs
Viewing all articles
Browse latest Browse all 18427

Artifacts at image boundaries when scrolling graphicsview

$
0
0
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://pbrd.co/16C2hEQ ()!

Viewing all articles
Browse latest Browse all 18427

Trending Articles