|
void DrawPic(number picNum,
[number animation, bool clear, number defaultPalette])
Draws a picture on the screen.
The last three parameters are optional. If specified, they can define
how the picture is displayed. If unspecified, the last used (or default)
parameters are used.
- The animation is executed when the
Animate() kernel is called. It can
be set to one of the following values (defined in SCI.SH):
| dpOPEN_INSTANTLY |
display instantly |
| dpOPEN_HCENTER |
horizontally
open from center |
| dpOPEN_VCENTER |
vertically
open from center |
| dpOPEN_RIGHT |
open from
right |
| dpOPEN_LEFT |
open from
left |
| dpOPEN_BOTTOM |
open from
bottom |
| dpOPEN_TOP |
open from
top |
| dpOPEN_EDGECENTER |
open from
edges to center |
| dpOPEN_CENTEREDGE |
open from
center to edges |
| dpOPEN_CHECKBOARD |
open random
checkboard |
| dpCLOSEREOPEN_HCENTER |
horizontally
close to center, reopen from center |
| dpCLOSEREOPEN_VCENTER |
vertically
close to center, reopen from center |
| dpCLOSEREOPEN_RIGHT |
close to right, reopen from right |
| dpCLOSEREOPEN_LEFT |
close to left,
reopen from left |
| dpCLOSEREOPEN_BOTTOM |
close to bottom,
reopen from bottom |
| dpCLOSEREOPEN_TOP |
close to top,
reopen from top |
| dpCLOSEREOPEN_EDGECENTER |
close from
center to edges, reopen from edges to center |
| dpCLOSEREOPEN_CENTEREDGE |
close from
edges to center, reopen from center to edges |
| dpCLOSEREOPEN_CHECKBOARD |
close random
checkboard, reopen |
- If the clear flag is set, the screen
will be cleared before drawing the picture. The flag's values are
defined in SCI.SH as follows:
| dpCLEAR |
Clear the screen
before drawing |
| dpNO_CLEAR |
Don't clear
the screen before drawing |
- defaultPalette specifies the default
palette to be used for drawing it (0-3). The palettes are contained
in the pic files and can be edited with SCI Studio's picture editor.
This is useful for displaying your picture in day/night colours.
| Example |
|
DrawPic(100
dpCLOSEREOPEN_EDGECENTER dpCLEAR 1)
/* draws PIC.100 closing the existing picture from center to the
edges, reopens with the new picture from the edges to center,
clearing the screen before drawing and using palette[1] as the
default. */
|
|