so is this algorithm used when that property is checked?
http://digital.ni.com/public.nsf/all...2576020075F784
so is this algorithm used when that property is checked?
http://digital.ni.com/public.nsf/all...2576020075F784
The basic idea is the same, but as the page does not explain its algo ( only the effect ) and I can't tell you how similar it is to what Qwt does.
In Qwt sequences of lines, that end up at the same x position are replaced by a maximum of 3 vertical lines, so that the outcome remains being a polygon ( the same is implemented for y coordinates and horizontal lines ).
- entering point
- minimum
- maximum
- leaving point
So in the worst case you have 3 lines per pixel + 1 line connecting the pixels.
In general it would also be possible to have even less lines by giving up having a polygon of connected lines. This would lead to even less work for the raster paint engine as the path "enter-min-max-leave" might have to pass some pixels twice.
Uwe
Of course you can print dots as well - this is what QwtPlotCurve::Dots style does ( a scatter plot ). If you want to go this way have a look at the scatterplot example. It does a completely different type of optimization, one that works for unordered points, is independent of hardware acceleration ( no OpenGL required ) and can be processed multithreaded.
But this is totally unrelated to my previous answers.
Uwe
Bookmarks