Hello !
I want to know how property change triggers
series/chart refresh.
Because it is more easy to program, I set all properties
at once, even they have not changed.
Concrete is this code faster:
if(CS->Pen->Width != aWidth)
CS->Pen->Width=aWidth;
else
do nothing
than always set property
CS->Pen->Width=aWidth;
Can I avoid so unnecessary redraws.
Best regards
Andreas
Chart refresh when
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Andreas,
Easiest way to avoid redundant drawing is setting chart's AutoRepaint property to false, setting it back to true latter and repaint the chart.
You'll find more information about using AutoRepaint at the Real-time Charting article here.
Easiest way to avoid redundant drawing is setting chart's AutoRepaint property to false, setting it back to true latter and repaint the chart.
You'll find more information about using AutoRepaint at the Real-time Charting article here.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Chart refresh when
Thank you for the tips, I will check it out.
But my main question was an other.
The code Property = x;
it not a value assign but a SetProperty(x) function call
of course.
Checks this function if the value of the property has
changed or not.
Is there code like this:
SetProperty( newProperty)
{
if(CurrentProperty == newProperty
return; // object must not repainted
CurrentProperty=newProperty;
ObjectMustRepainted=true;
}
Costs it time to set permant
the Property to the same value,
or only if it changes.
But my main question was an other.
The code Property = x;
it not a value assign but a SetProperty(x) function call
of course.
Checks this function if the value of the property has
changed or not.
Is there code like this:
SetProperty( newProperty)
{
if(CurrentProperty == newProperty
return; // object must not repainted
CurrentProperty=newProperty;
ObjectMustRepainted=true;
}
Costs it time to set permant
the Property to the same value,
or only if it changes.
narcis wrote:Hi Andreas,
Easiest way to avoid redundant drawing is setting chart's AutoRepaint property to false, setting it back to true latter and repaint the chart.
You'll find more information about using AutoRepaint at the Real-time Charting article here.
Hi Andy,
the Chart is only repainted when a property value has been changed. Assign the same property value the Chart should not be repainted.
In case you notice setting the same property value makes to repaint the entire or part of the Chart let us know and we'll check the source to know why this is happening.
the Chart is only repainted when a property value has been changed. Assign the same property value the Chart should not be repainted.
In case you notice setting the same property value makes to repaint the entire or part of the Chart let us know and we'll check the source to know why this is happening.
Pep Jorge
http://support.steema.com
http://support.steema.com