In issue http://bugs.freepascal.org/view.php?id=12377, reporter said:
Painting to an Bitmap and paint this on the Canvas would be much faster
This assertion is, of course, incorrect. I assume that the reporter's problem is actually that the TChart flickers when repainted.
The flickering is caused by two sources:
1) The TChart is TGraphicControl, so Parent control erases chart's background before every repaint.
2) TChart itself draws directly to screen, first clearing the canvas.
First source obviously needs fixing, and I attached to the issue a patch which fixes it.
The only caveat is that TChart is now TWinControl -- can it lead to some undesirable consequences I am not aware of?
The second source can also easily be fixed by double-buffering, but before I do that,
I have two questions:
1) TWinControl.WMPaint already contains double-buffering code, but it is protected
by {$ifdef BUFFERED_WMPAINT}. What is the reason of this? Is there some ongoing work to implement double-buffering globally?
2) If double-buffering will be implemented in TAChart itself, it will have some negative
performance impact. So, should I make it optional via DoubleBuffer property?
