PDA

View Full Version : QwtSeriesData::boundingRect() question



TorAn
2nd May 2011, 15:34
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?

Uwe
2nd May 2011, 18:52
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