LOADPIC
Syntax LOADPIC filename.ext 
LOADPIC type-decriptors
(LOADPIC)
(LOADPIC filename.ext windowname)
(LOADPIC filename.ext windowname "true)

 
 
Explanation LOADPIC loads the file from the disk to the graphics screen. The file is loaded as a bit map which fills the graphics window. Note that the file still exists on the disk; only a copy of it has been transferred to the graphics screen. If no extension is given for the filename, the picture format used is the format specified in the built-in variable PICTURE.FORMAT. If the file has a different extension, then the extension must be specified in the LOADPIC command.

LOADPIC can load JPEG format and Windows bitmaps (.BMP) files and Macintosh PICT files on the Macintosh.

If LOADPIC is enclosed in parentheses with no arguments, as in (LOADPIC), a standard File Open dialog box appears. The file to be loaded may be chosen from the dialog box.

It is also possible to open a dialog box instead of a file and specify the types of files that appear in the dialog box available to be loaded. To do so, the argument for LOADPIC must be the appropriate file type descriptor. A file type descriptor is a file type, followed by "=" and a description. The text "JPG=JPEG files" would be a vaild file type descriptor for all files ending with ".JPG". More than one file descriptor may be supplied; in this case, separate the descriptors with commas. The File Open dialog displays all files ending with the given file type(s). A Windows dialog would also display the description of the file types, while a Macintosh dialog would display the matching files only. The Logo command LOADPIC "|JPG=JPEG files,BMP=Windows bitmaps| would, for example, display all files ending with .JPG or .BMP.

If you use "|*=All files| as a file type, the File Open dialog displays all available files. This is done differently on Windows and Macintosh. A Windows dialog initially displays all files with the first type, and offers all additional file types as choices. The Macintosh dialog always displays all files matching all file types.

If you do not supply a file name, Logo automatically opens a File Open dialog displaying all available files.

The name of the Graphics window whose background is to be set may be supplied as a second, optional input. If this input is omitted, the file is loaded into the current Graphics window.

A loaded image is stretched to fit the current size of the Grapics window. If a third, optional input is set to TRUE, the picture is tiled instead. As many copies as fit into the window fill the window completely.

Clicking the Cancel button in a file open/save dialog cancels the execution of the LOADPIC command.

See also LOAD, LOADSNAP, SAVE, and SAVEPIC.

Examples LOADPIC "ToolBox/Backgrounds/Norway.jpg


TopIndex