This article applies to:
E-Prime 3.0
E-Prime 2.0
E-Prime 1.x
Detail
This sample illustrates using the Canvas object's drawing commands and synchronization with the redrawing of the screen in order to present apparent motion.
Abstract
The Canvas object's drawing commands may be used to create 'animation' in E-Prime. This example draws two lines and moves them closer together. The time at which the lines intersect is logged and compared to the participant's response time.
A WaitForVerticalBlank 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 or later), 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 not be necessary and if used would cause the Canvas operation to draw a refresh later. Whether using flipping or not, we recommend when performing any drawing commands to do so on an offscreen canvas and then use one Canvas.Copy operation to update the screen.
See Also:
Comments
0 comments
Please sign in to leave a comment.