[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.5.4 Display Picture (#B)

The Display Picture command displays a picture. The picture may be referenced either by name or number. It is also given a timelimit within which picture must be displayed; Display Picture shows the image and waits until the specified number of milliseconds have elapsed since it started.

In addition, the position of the picture may be specified. If it is omitted, the default position for the current picture type is used.

Note: Do not use filenames for pictures that start with numbers. Display Picture will interpret an argument that starts with a digit as a picture number, not a filename that starts with a digit.

Name:
Display Picture
Class:
Picture
Code:
#B
Syntax:
#B[picname | picnum,time[,x,y]]
picname is a filename
picnum is an integer u
time is a timelimit from 0 to FAIRTIME (by default, )
x is an integer from 0 to (width of current mode - width of current picture)
y is an integer from 0 to (height of current mode - height of current picture)
System:
Displays the picture identified by picname or picnum. Picture is positioned at (x,y), or at current picture type's default display location. Display Picture ensures that it takes exactly time milliseconds to complete.
Requires:
Cogsys must be in a graphics mode. The referenced picture must already be loaded by either the Load Picture List, Load Referenced Pictures, or Create Pictures by CXR commands.

History:
Before Cogsys 3, the #B command meant display next picture; which meant that the order of pictures had to be enumerated with the !...! construction beforehand.

Now, each #B requires an argument specifying which picture to display. This couples the picture identifier with command that displays it, which is far more easier to work with.

Test Files:
`PICT_T01.IN'
tests basic operation
`PICT_B01.IN'
performs benchmarks for picture display

Examples:

input
#B[26,20
cogsys
Display picture 26 and waits until 20 ms have elapsed since start of command.

input
#B[DAFFY,30,10,10
cogsys
Displays the picture stored in file `default-path/DAFFY.PCX' at position (10,10) and waits until 30 milliseconds have elapsed. default-path is either the default picture path, , or is the value explicitly set by the most recent %B.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Usman Muzaffar on June, 28 2000 using texi2html