Element: graphic_window.redraw { }

Type

callback

Description

One of the command procedures to be executed when graphic_window is repainted due to a recalculation of its contents.

When window redraw procedures are defined and invoked, the following steps are executed:

  1. The window pre_redraw procedure (if defined) is called.

  2. The window background layers ( background and/or cloth) are painted.

  3. The window redraw procedure (if defined) is called. Within this procedure, manual calls to draw graphics can be made.

  4. Other layers are painted individually. For each vector layer, a call is made to the window populate procedure (if defined) before painting, passing the group corresponding to the vector layer as a parameter.

  5. After the last vector layer has been painted, the window post_redraw procedure (if defined) is called. Within this procedure, manual calls to draw graphics can be made.

  6. Any other non-vector layers (e.g. grid, vane, scalebar) which have not already been painted are painted.

  7. Any graphic primitives on the window overlay group are painted.

When a redraw procedure is executed, the window identifier is passed to the procedure as a parameter.

The redraw procedure is not invoked on repaints due to simple window exposure, but only on a change of window size and/or a redefinition of its corners.

Within a redraw procedure there should be no commands which change the view of the window. Requests to draw entities or image files (draw/rasdraw commands) result in draws to a pre-vector layer. Commands which add new entities valid for the window are permitted but the entities are not drawn until the vector layers are rendered. Requests to redraw the window contents will be ignored. This procedure is typically used to add graphics before entity graphics are rendered.

New windows have a redraw procedure of null.

Parameters

window.redraw(<window>)

See Also

Commands:

draw, rasdraw, wpaint

Structures:

window.populate, window.post_redraw, window.pre_redraw, window.pre_vector_layer