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. GraphicsView: Optimize painting to the actual update region
Forum Updated to NodeBB v4.3 + New Features

GraphicsView: Optimize painting to the actual update region

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 385 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    I am displaying live data in the form of curves (polylines) on terribly weak embedded hardware. The curves run from left to right, then the whole display is scrolled about 1/4 of it's width and I get some room to continue drawing.
    Therefore, most of the time I only append a few points and would only need to paint those few points.

    However, the paint() event is required to be able to redraw the whole GraphicsItem, so I have to draw the whole polyline every time paint gets called - even if the actual update region is only a few pixels wide.

    How can I determine the actual update region within the paint event, so I can - depending on what's needed - repaint everything or just the part that needs to be redrawn?

    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