TCustomIvorySurface::ClearBackground

Determines whether the surface should be cleared before the OnPaint event.

__property bool ClearBackground;

Description

Set ClearBackground to true if you want to get a clear background. The new background doesn't take effect automatically; you must call Paint to repaint the surface with the new background. If ClearBackground is false, the surface doesn't clear its background. In this case, the background remains undefined, unless you paint the surface on your own. The default value for ClearBackground is true.

Notes

TIvorySurface can automatically paint something in the background. If TIvorySurface::DrawBackground is true, the surface doesn't clear its background, but it draws a bitmap or another surface on the surface. If you want to paint the surface on your own, you can set ClearBackground and DrawBackground to false, so that you speed up you application. But in this case, the surface will remain undefined, and you need to clear or fill the surface on your own.

TIvoryBitmapSurface automatically paints the surface, it always fills out the whole surface, so ClearBackground has no effect in in this component. That's why this property is not even published.

Back to TCustomIvorySurface