Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Artifacts at image boundaries when scrolling QGraphicsview
Forum Updated to NodeBB v4.3 + New Features

Artifacts at image boundaries when scrolling QGraphicsview

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rivimey
    wrote on last edited by
    #1

    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)!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      It doesn't look like your attached image is working.

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rivimey
        wrote on last edited by
        #3

        Is this link any better?

        !http://pasteboard.co/108iPpyQ.jpg()!

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved