Silverfrost Logo About Us | Contact Us
 

Updating the screen

By default a call to a graphics function will not produce an instantaneous update of the screen. Instead ClearWin+ waits until you have finished your current sequence of graphics calls from within your callback (i.e. it waits until the application is idle). This mechanism is suitable for most circumstances. However, a call to the routine perform_graphics_update@ will cause an immediate update should this be required.

When your application is in an idle state or a call to perform_graphics_update@ is made, changes to the graphics buffer are copied to the screen. ClearWin+ keeps track of the smallest rectangle to enclose the changed areas and updates only this region. As a result, if your program updates information at opposite corners of a large graphics region (as an extreme example) it may be faster to insert calls to perform_graphics_update@ so that each small region is updated separately.

If you use %dw, ClearWin+ cannot automatically detect the smallest rectangle to be updated and so by default it updates the whole of the graphics region whenever a change is made. A call to the routine set_update_rectangle@(x1,y1,x2.y2) sets the update rectangle making the program run faster. Once used, this routine must be called whenever the update rectangle changes.

 

 

Copyright © 1999-2017 Silverfrost Limited