What is the best case for panner
Hello.
How can I improve performance in next case:
I have big amount of plots ( f.e. near 25 ) and at each plot may be 1-4 curves with 103859 points...
I tried to develop some kind of panner but there is show bad results, there is really slow down. I have next situation now... I get all points for all curve and then with help of setAxisScale(...) show some part of all interval, but there is hard to replot all graphics when I want drag plot f.e. right , there is too slow doown. Then I think to use QwtPlotPanner, but when I look to source code I see that QwtPlotPanner do replot() and setAxisScale() too, so I thinhk it will be bad too.
So can U give me some advise?
Re: What is the best case for panner
QwtPlotPanner grabs the content of the plot canvas to a QPixmap and moves this pixmap while panning.
A replot is only done once, when you stop panning - what is way faster than your implementation doing replots while you are panning.
Uwe
Re: What is the best case for panner
Can I do that there is not be white space when I drag plot with help of QwtPlot?
Re: What is the best case for panner
The short answer is no.
The other ( also short ) one is: then you would need to generate a pixmap that contains all neighbored areas ( 9 times as large ) instead of simply grabbing the content of the canvas. I never tried it myself but it might be possible by overloading QwtPanner::grab() and maybe some other methods.
Uwe
Re: What is the best case for panner
Quote:
Originally Posted by
Uwe
The short answer is no.
The other ( also short ) one is: then you would need to generate a pixmap that contains all neighbored areas ( 9 times as large ) instead of simply grabbing the content of the canvas. I never tried it myself but it might be possible by overloading QwtPanner::grab() and maybe some other methods.
Uwe
What do U mean when U told "neigghboard areas"?
And I also want to ask is it some way to cache all points of graphic and show only needfull interval? Or I always for update graphic need to do replot?
Re: What is the best case for panner
Quote:
Originally Posted by
carhun
What do U mean when U told "neigghboard areas"?
The maximum of the distance you can pan depends on width and height of the canvas ( than the mouse has left the canvas ).
So when your canvas has a size of 800x600 pixels you could render an image with a size of 2400x1800 pixels, where the initial content of the canvas is in the center.
Quote:
And I also want to ask is it some way to cache all points of graphic ...
Thinking twice about this question you will answer yourself ...
Uwe