Results 1 to 2 of 2

Thread: QwtSeriesData::boundingRect() question

  1. #1
    Join Date
    Nov 2009
    Location
    US, Midwest
    Posts
    215
    Thanks
    62
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QwtSeriesData::boundingRect() question

    I'll appreciate a help in understanding what "boundingRect" means in the context of QwtSeriesData model. My questions are:

    Documentation states that boundingRect "Calculate the bounding rect of all samples". If vector of sorted pairs<double, double> is displayed - does it mean that boundingRect is the coordinates of the last data point?

    Documentation states that " For large sets it is recommended to implement something faster f.e. by caching the bounding rect.".
    What are the conditions where this boundingRect value should be recalculated if the curve is not changing? In other words, if boundingRect calculates bounding rect of all samples - it is constant, isn't it?

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

    Default Re: QwtSeriesData::boundingRect() question

    Quote Originally Posted by TorAn View Post
    Documentation states that boundingRect "Calculate the bounding rect of all samples". If vector of sorted pairs<double, double> is displayed - does it mean that boundingRect is the coordinates of the last data point?
    No it means what is written in the documentation: the bounding rectangle of all points.

    Documentation states that " For large sets it is recommended to implement something faster f.e. by caching the bounding rect.".
    What are the conditions where this boundingRect value should be recalculated ...
    Like for any cache - it needs to be recalculated, when the bounding rectangle changes. So when you never change your samples, then the bounding rectangle never changes and you will never have to recalculate the cached rectangle.

    Uwe

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

    TorAn (2nd May 2011)

Similar Threads

  1. Replies: 1
    Last Post: 18th June 2010, 12:21
  2. Question on QGraphicsProxyWidget and boundingRect
    By qlands in forum Qt Programming
    Replies: 1
    Last Post: 14th June 2010, 13:29
  3. Why must I pad boundingRect() by 7 pixels
    By xenome in forum Qt Programming
    Replies: 3
    Last Post: 10th September 2009, 15:07
  4. Convert QwtRasterData to QwtSeriesData
    By bigjoeystud in forum Qwt
    Replies: 3
    Last Post: 25th August 2009, 16:06
  5. boundingRect()?
    By aaron in forum Qt Programming
    Replies: 6
    Last Post: 21st April 2009, 10:43

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.