This sample illustrates using the Canvas object's drawing commands and synchronization with the redrawing of the screen in order to present apparent motion.
The Canvas Object's drawing commands may be used to create "animation" in E-Prime.This example draws an two lines and moves them closer together. The time at which the lines intersect is logged and compared to the subject's response time.
A Wait for Vertical Blank command assures that drawing times are stable, and the apparent movement is smooth as a result.
NOTE: When flipping is enabled (in E-Prime 2.0.10.x), all E-Basic Canvas calls targeting the on-screen canvas will internally wait for the vertical blank refresh period. The use of Display.WaitForVerticalBlank will thus not be necessary and if used would cause the Canvas operation to draw a refresh later. Whether using flipping or not, it is recommend when performing any drawing commands to do so on an offscreen canvas and then use one Canvas.Copy operation to update the screen.