Closed amancini closed 3 years ago
Originally the component inherits from TGraphicControl, but we changed from TGraphicControl to TCustomControl to implement doublebuffered, as explained in this discussion: https://github.com/EtheaDev/SVGIconImageList/issues/74
In your tests, are you using DoubleBuffered as True?
I try to set DoubleBuffered as true . but the repait issue was not resolved
I'm thinking to revert the base class of TSVGIconImage from TCustomControl to TGraphicControl, because the DoubleBuffer option is provided automatically into Direct2D, Cairo and Image32 libraries. Do you agree @pyscripter or am I wrong?
I think Direct2D, Cairo and Image32 paint to a bitmap and then render the bitmap to the DC. TSvg draws directly to the DC. I am not using TSvgIconImage and don't have strong views on this.
Now I've committed a new version of TSVGIconImage:
@amancini: can you make some test with the new version using also the new Image32 factory?
No positive/negative feedback... I'm closing this issue.
Hello,
The TSVTIconImage is painted many times because during the drawing massage it is called the procedures TWinControl.PaintHandler (var Message: TWMPaint); that call the PaintWindow (DC)
Why use TCustomControl and not use the "Classic" TGraphicControl ?
By changing the class from which TCustomControl derives to TGraphicControl the problem is solved, ( the properties of doublebuffer and parentbuffered and paretBackground are lost )
I have attached a video with the effect produced and the fix on the SVGIconImage.pas
5Q0gX3UtSI.zip SVGIconImage.zip
best regards