All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

redisplay-element Function

Summary

Force redisplay of an output-pane or a pinboard-object.

Package

capi

Signature

redisplay-element element &optional x y width height

Arguments
element
x, y, width, height
Positive reals or nil. Default nil.
Description

The function redisplay-element causes element to be redisplayed. Redisplaying causes the display-callback of element to be called. When element is pinboard-object, the display-callback of its pinboard-layout is called.

redisplay-element is special in that it can be called from any thread, as opposed to almost all of the other CAPI functions, which must be called from the thread to which element belongs.

x, y, width and height specify which part of element to redisplay. If x or y are nil, they are set to 0. If width is nil, it is set to the width of element minus x, and if height is nil it is set to the height of element minus y. Thus if redisplay-element is called with only element, it redisplays all of it.

Notes

redisplay-element is the same as gp:invalidate-rectangle, except that redisplay-element is safe to call from any thread, which gp:invalidate-rectangle is not.

The call to the display-callback is asynchronous, and there is no specific call to the display-callback that matches a given call to redisplay-element. redisplay-element just guarantees that, provided element is displayed and nothing is broken, at least one call to the display-callback will happen with the given rectangle or a rectangle that contains it.

Examples

This example shows use of redisplay-element from a timer:

(example-edit-file "capi/graphics/metafile-rotation.lisp")
See also

gp:invalidate-rectangle
output-pane
pinboard-object


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:27