Direct Access to Color Grid Values
Posted: Mon Jan 04, 2016 7:08 pm
Hi.
We are trying to optimize the performance of TColorGrid and are wondering about the usage of the "Values" property. Internally it always seems to call AddXYZ - regardless if the value already existed.
Is there no way to only update the color values of a grid?
Example:
If the flag "update" is true internally AddXYZ still is called.
Thanks.
We are trying to optimize the performance of TColorGrid and are wondering about the usage of the "Values" property. Internally it always seems to call AddXYZ - regardless if the value already existed.
Is there no way to only update the color values of a grid?
Example:
Code: Select all
const double xStepWidth = 1.0, yStepWidth = 1.0;
double yCurrent = 0.0;
for(unsigned y = 0; y < data_.size(); ++y)
{
double xCurrent = 0.0;
for(unsigned x = 0; x < data_[y].size(); ++x)
{
if(update)
series->Value[xCurrent][yCurrent] = data_[y][x];
else
series->AddXYZ(xCurrent, data_[y][x], yCurrent);
xCurrent += xStepWidth;
}
yCurrent += yStepWidth;
}
Thanks.