TIvorySurface::Paint
Repaints the surface.
void __fastcall Paint();
Description
Use Paint
to repaint the surface. Paint does the following:
- Checks if the surface is created
- Calls the BeforePaint event
- Grabs a Device Context and initializes Canvas
- If DrawBackground is true, draws the background image
- If DrawBackground is false, but ClearBackground is true, fills the background with BackgroundColor
- Calls the OnPaint event
- Releases the Device Context and uninitializes (invalidates) Canvas
- Calls the AfterPaint event
- If MapEnabled is true, draws the map
- Calls the AfterDrawMap event
The Canvas can only be used
within the OnPaint event. CopySurface
can be used everywhere but in the OnPaint event.
Back to TIvorySurface