SclGraphicsUpdateDisplay
Overview
Force the screen to be updated with the contents of the graphics database immediately.
Synopsis
SclGraphicsUpdateDisplay
Description
The graphics database is rendered to the screen at specific times. Each time script execution is completed the display is updated. Updates also occur at specific times during the course of script execution for a variety of reasons. Whenever one of these update events occurs the graphics database is rendered to the screen.
The SclGraphicsUpdateDisplay command gives you control over the update cycle to ensure that updates happen when you need them. This especially crucial if you are trying to achieve a smooth animation effect.
Returns
None.
Examples
#
# This example shows how animation can be achieved by successively
# inserting and deleting markers at slightly different locations
#
set segKey [SclGraphicsOpen mynode]
SclGraphicsSetHeuristics "quick moves"
# insert the marker and retain its key for later deletion
set key [SclGraphicsInsertMarker 2450 6750 150]
SclGraphicsSetMarkerSymbol {[*]}
SclGraphicsSetMarkerSize 2
SclGraphicsSetColour yellow
set y 6750
for {set i 0} {$i < 100} {incr i} {
# animate by deleting the marker and inserting another at a
# different location
SclGraphicsDeleteByKey $key
set y [expr $y + 1]
if {$i == 50} {
# let's make the marker red after a little while
SclGraphicsSetColour red
}
set key [SclGraphicsInsertMarker 2450 $y 150]
SclGraphicsUpdateDisplay
}
SclGraphicsSetHeuristics "no quick moves"
SclGraphicsClose