I develop a browser-like application, where the canvas has large height and "ordinary" width, something like 1024x999999. I display a picture using 512 cached QPixmap blocks (1024x128), re-using them to display newly drawing areas. So if user scrolls around some given area of the large image, CPU is not busy, the cached blocks is used. So, this is how my engine works, briefly.
Want to implement a zoom. Don't know - smooth or discrete (x2, x3, x4...). Performance questions:
- Is there any effective way to scale QPixmap on-the-fly in paintEvent() without allocating too much memory?
- or maybe i should think about "zoom-layers" that cache zoomed picture for different zoom factors? But this makes smooth zooming impossible...