Qt Code:
  1. virtual double QwtRasterData::value (double x, double y ) const
  2. in Qwt 6.0.1
To copy to clipboard, switch view to plain text mode 

is occasionally called with value for x and/or y greater than QwtInterval::maxValue(), in particular when zooming in or out.

Eg:

Assume pixelHint = (0,0,1,1) so we render in "pixels of data" resolution OR in screen resolution, whichever is smaller. Assume a setInterval( Qt::XAxis, QwtInterval(0,99)); to render a 100 pixels long data (from 0>99, 100 being excluded)
we will have QwtRasterData::value() occasionally requesting data for double x == 100. Of course, the display never renders it as it stops rendering at 99 to 100 only.

When zooming in a lot so each pixels of the data are renderd on screen, x or y in value() is never > than QwtInterval::maxValue(). This shows that we are facing some edge conditions and that the value x = 100 is not needed at all.

Sure a "bad" patch is to do QwtInterval(0,98) or to do a QwtInterval(0,99, QwtInterval::ExcludeMaximum) but by doing so we lose 1 rank of pixel of a 2D image in both cases which is not nice at all.

Any idea?

Thanks. Best regards.