|
|||||||||||||
|
|
The DRAWIMAGE Statement Available in Pendragon Forms 4.0 Service Pack 4 The DRAWIMAGE statement is used to draw an image on the screen without using a Pendragon Forms Image field. This is especially handy when you want to keep a collection of image files on a VFS volume (usually an SD card or Memory Stick) without having Pendragon Forms synchronize the images. Pendragon Forms image fields synchronize like other Pendragon Forms fields, and typically this means that images are transmitted to the handheld’s VFS volume during each HotSync. In some circumstances, this can be time consuming. Using the DRAWIMAGE statement, there is an alternative. You can copy images to a directory on the card using some external mechanism (e.g., a flash memory drive), and maintain only the image filenames in your Pendragon Forms record. When you need your form to display an image, you use the DRAWIMAGE statement to draw the named file on the card onto the screen. The DRAWIMAGE statement looks like this: drawimage top height filename The top parameter is the vertical pixel at which the image will be painted. The height parameter is the maximum amount of vertical space used to display the image. To use the entire screen, top would be equal to 16, and height would be equal to 128. Whether you are using a high-resolution screen (320x320 pixels or 320x480 pixels) or not, Pendragon Forms always refers to the screen as if it had 160x160 resolution. In other words, write your script as if the screen were 160x160, and Pendragon Forms will scale up the coordinate values appropriately. Note that the DRAWIMAGE statement will overwrite controls on the screen if you allow it to. This is not recommended because you may see unusual effects. For example, if you set the top parameter to zero, the image will overwrite the title bar. The filename parameter is the name of the file on the VFS volume. A typical application of this statement would be the following:
enterscreen: As far as image formats, dimensions and color depths are concerned, the DRAWIMAGE statement has the same capabilities and restrictions as the standard Pendragon Forms Image field.
© 2004 Pendragon Software Corporation. All rights reserved. Copyright and trademark information. |
|
|||||||||||