|
Designed for computer science instruction, Turing is simply the easiest, most fun, and most effective way of teaching programming concepts. |
|
Quick Links |
||
Various versions of Turing have the ability to import graphics files created by external programs. This allows users to create artwork for their program using graphics programs such as Corel Draw or ClarisWorks and then use the resulting file in their Turing or OOT program.
At the present time, there is no universal format that all versions of Turing can read. Thus it may be necessary to convert an image into a different format for a particular platform. In general, it's advised that you look at what format is needed for a particular version of Turing and, if possible, save the picture in that format. This is because some conversion programs don't work perfectly.
The following table illustrates the different import formats required. Click on the software to see how to import graphics for that particular platform.
| Software | Graphics Formats Accepted |
|---|---|
| WinOOT 3.1.1 and Turing 4.0 | BMP |
| MacOOT | PICT |
To display BMP format files in WinOOT, you use the Pic.ScreenLoad procedure. Pic.ScreenLoad has the following definition.
procedure Pic.ScreenLoad (filename : string, x, y, mode : int)
| filename | The name of the file to be loaded. |
| x, y | The lower left corner of the picture. |
| mode | The mode to display the picture in. One of picCopy, picXOR, picMerge or picUnderMerge. |
The other method of reading a file is to load the image into a pic, getting a picID and then using Pic.Draw to display it. This is done using the Pic.FileNew procedure.
function Pic.FileNew (filename : string) : int
| filename | The name of the file to be loaded. |
| Returns | The picID that can be passed to other procedures in the Pic module. |
To display PICT format files in MacOOT, you use the Pic.ScreenLoad procedure. Pic.ScreenLoad has the following definition.
procedure Pic.ScreenLoad (filename : string, x, y, mode : int)
| filename | The name of the file to be loaded. |
| x, y | The lower left corner of the picture. |
| mode | The mode is ignored in MacOOT. |