Results 1 to 3 of 3

Thread: QwtRasterData::value(x,y) giving x ot y > QwtInterval::maxValue()

  1. #1
    Join Date
    Mar 2012
    Posts
    16
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default QwtRasterData::value(x,y) giving x ot y > QwtInterval::maxValue()

    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.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,312
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QwtRasterData::value(x,y) giving x ot y > QwtInterval::maxValue()

    Quote Originally Posted by MattK View Post
    [CODE]Assume pixelHint = (0,0,1,1) ...
    QwtPlotSpectrogram::pixelHint() is broken in Qwt 6.0.1 - the bug had been fixed in SVN ( 6.0 and trunk ) a couple of weeks ago.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    MattK (1st May 2012)

  4. #3
    Join Date
    Mar 2012
    Posts
    16
    Thanks
    15
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QwtRasterData::value(x,y) giving x ot y > QwtInterval::maxValue()

    Hi, Uwe, thanks for your usual super quick intervention :-)

    There is no code in QwtPlotSpectrogram:ixelHint(). The default implementation just return data()->pixelHint( rect );

    Did you mean the last fix in QwtPlotRasterItem::draw() maybe tagged as "Usage of pixelHint fixed" ? -> http://qwt.svn.sourceforge.net/viewv...=date&view=log ?

Similar Threads

  1. Replies: 0
    Last Post: 4th January 2012, 22:48
  2. QwtRasterData and non-linearly sampled data
    By DizzyMoods in forum Qwt
    Replies: 3
    Last Post: 23rd December 2011, 11:50
  3. Replies: 8
    Last Post: 2nd November 2011, 16:31
  4. QwtRasterData and values
    By DKL1972 in forum Qwt
    Replies: 12
    Last Post: 10th March 2010, 09:53
  5. Convert QwtRasterData to QwtSeriesData
    By bigjoeystud in forum Qwt
    Replies: 3
    Last Post: 25th August 2009, 15:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.