setRawSamples/setSamples are simply convenience methods creating a data object calling setData then. Behind the back means that you modify the samples inside of this data object without telling the curve with another call of setData.Just for curiosity, then, how would I do this? (makes the curve aware of the fact that data has changed)
How should I know - it depends on the details of your application.what exactly should I put inside the overloaded method?
f.e. if your x values are ordered in time you know the the x value of the first one is the minimum and the last one the maximum. If you add a new sample to an existing set, where you already know the bounding rectangle, all you need to do is to extend it by the coordinates of the new sample. Using such extra information makes it easy to find an implementation, that is way more efficient than the default implementation, that iterates over all points.
Uwe




Reply With Quote

Bookmarks