flush_buffer — Flush the contents of a window.
flush_buffer( : : WindowHandle : )
flush_buffer flushes the contents of the window
WindowHandle.
flush_buffer is only necessary if the window parameter
'flush' has been set to 'false' with
set_window_param. If 'flush' is 'false' all
display operations (such as disp_obj or disp_text) are
redirected to a buffer and have no effect on WindowHandle
(this applies for all window modes). flush_buffer copies the
contents of this buffer to the window WindowHandle.
This is very useful to avoid flickering by batching several display
operations (e.g., a clear_window followed by a disp_obj)
and displaying the final result with flush_buffer.
This does not apply to drawing objects, which are always updated.
flush_buffer depends on the library libcanvas, which might not be
available on embedded systems.
WindowHandle (input_control) window → (handle)
Window handle.
read_image (Image, 'printer_chip/printer_chip_01')
threshold (Image, Region, 128, 255)
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
set_window_param (WindowHandle, 'flush', 'false')
dev_display (Image)
dev_display (Region)
disp_text (WindowHandle, 'Result of threshold', 'window', \
12, 12, 'black', [], [])
* nothing is displayed until flush_buffer is called
flush_buffer (WindowHandle)
If the window exists flush_buffer returns 2 (
H_MSG_TRUE)
.
Foundation