Element: graphic_window.post_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 post_redraw procedure is executed, the window identifier is passed to the procedure as a parameter.

The post_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 post_redraw procedure there should be no commands which change the view of the window, and requests to redraw the window contents will be ignored. Requests to draw entities or image files (draw/rasdraw commands) or to add text labels to entities (window.annotate) result in creating and rendering a post-vector layer for the window. This procedure is typically used for the following operations:

the addition of manual graphics, e.g. logos, advertising,

the updating of other windows, e.g. an overview window, status bar

the addition of entities to be shown on the overlay layer

Entity changes which impact the vector layers of the window should be avoided since they have already been painted (see above). If this is attempted the visual results are undefined.

New windows have a post_redraw procedure of null.

Parameters

window.post_redraw(<window>)

See Also

Commands:

wpaint

Structures:

window.annotate, window.populate, window.post_vector_layer, window.pre_redraw, window.redraw