Paints a sub-surface if it is necessary.
void __fastcall PaintSubSurface(TCustomIvorySurface* surface);
Description
PaintSubSurface is an inline function declared as follows:
void __fastcall PaintSubSurface(TCustomIvorySurface* surface) { if(SubPaint) surface->Paint(true); }
Use PaintSubSurface inside the OnPaint event to repaint the dependent surfaces. For example, if you want to copy Surface1 onto the backbuffer surface, call PaintSubSurface(Surface1) in the beginning of the OnPaint event of the backbuffer surface. This way you ensure that Surface1 paints before you copy it on the backbuffer, provided it is necessary to repaint. PaintSubSurface only paints the dependent sub-surface if repaint is necessary.