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

2.3.5.2 Load Picture List (%Q)

The Load Picture List command is given the name of a text file which contains a list of pictures. Load Picture List implicitly resets the picture list, then loads the pictures listed.

The file should be a plain text file with one filename per line. If a filename is not absolute (that is, it doesn't start with an MS-DOS drive letter, like `C:\MYDIR\MYPIC.PCX') then the Cogsys system constant DEFAULT_PIC_PATH (by default, ) is prepended to the file before it is loaded. The Load Picture References command can affect the default path.

The file name (just as it appears in the file, before any path adjustments) is entered into the picture list and can be used when displaying this picture by name with the Display Picture command.

Pictures are loaded into the picture buffer started at 1.

Name:
Load Picture List
Class:
Pictures
Code:
%Q
Syntax:
%Q[listfile]
listfile is a filename
System:
Resets the picture buffer and loads the pictures listed in the listfile into memory. The filename as it appears in listfile is entered into the picture list (for use with commands which refer pictures by name). The pictures are numbered starting with 1 (for use with commands which refer pictures by number).
History:
As noted at the beginning of this section, picture loading before Cogsys 3 was very inefficient and awkward.

The simplest way translate a list which uses the %F/!...! mechanism is to replace the %F with a %Q. Then, replace calls to #B with calls to the new #B which explicitly requires a picture number. Finally, remove the !...! contruction entirely.

For even more powerful methods, look at the Load Picture References and Create Pictures with Extension Routine commands later in this section.

Test Files:
`LPCL_T01.IN'
tests basic operation

Examples:

input
%M2%C2%Q[mypics.txt]#B[1,20]@C
cogsys
Switches to Mode 2, and sets picture type to 2. The %Q command then loads up the PCX Version 5 picture files given in the list file `mypics.txt'. Now the #B command displays the first image for 20 milliseconds at the default position for a Type 2 picture, (160,140), the center of the screen. Finally, the screen is cleared with a call to @C.


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

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