Pic.DrawSpecial | Part of Pic module |
Syntax | Pic.DrawSpecial (picID, x, y, mode, transition, duration : int)
| ||||||||||||||||||||||||||||||||||||||||||||||
Description | Pic.DrawSpecial is used to draw a picture on the screen with a
special effect such as a wipe, a slide, or a fade-in.
The picture is drawn with the lower left corner at
(x, y). The duration specifies how long the
transition should take in milliseconds. For example, a fade-in could
be specified to last 1/2 a second by using a duration of 500. The mode parameter is the same as in Pic.New and has one of the following values:
The transition parameter indicates the special effect and has one of the following values:
| ||||||||||||||||||||||||||||||||||||||||||||||
Execute | |||||||||||||||||||||||||||||||||||||||||||||||
Details | The Pic.DrawSpecial requires a moderately fast machine to
operate successfully (Pentium III or higher). The picFadeIn
and picBlend transitions do not work well on 8-bit (256 color)
displays. On Microsoft Windows machines, you can determine the
bit-depth of the display (the number of colors available) by
selecting the Display control panel from the Start
menu. You can also use the Config.Display (cdNumMaxColors) function to determine the bit-depth of the display (anything over 256 colors will produce acceptable results).
| ||||||||||||||||||||||||||||||||||||||||||||||
Details | If the Pic.DrawSpecial call fails, Error.Last will return a
non-zero value indicating the reason for the failure.
Error.LastMsg will return a string which contains the textual
version of the error.
| ||||||||||||||||||||||||||||||||||||||||||||||
Example | The program draws a blue star on the screen, then a red circle, then
proceeds to have to have the two replace each other with a variety of
transitions.
var redID, blueID: int var x, y : int Draw.FillStar (50, 50, 150, 150, brightred) redID := Pic.New (50, 50, 150, 150) cls Draw.FillOval (100, 100, 50, 50, brightblue) blueID := Pic.New (50, 50, 150, 150) Pic.DrawSpecial (redID, 50, 50, picCopy, picWipeLeftToRight, 500) Pic.DrawSpecial (blueID, 50, 50, picCopy, picWipeTopToBottom, 500) Pic.DrawSpecial (redID, 50, 50, picCopy, picSlideLeftToRight, 500) Pic.DrawSpecial (blueID, 50, 50, picCopy, picSlideTopToBottom, 500) Pic.DrawSpecial (redID, 50, 50, picCopy, picFadeIn, 1000) Pic.DrawSpecial (blueID, 50, 50, picCopy, picBlend + 50, 0) Pic.Free (redID) Pic.Free (blueID)
| ||||||||||||||||||||||||||||||||||||||||||||||
Execute | |||||||||||||||||||||||||||||||||||||||||||||||
Execute | The following program demonstrates each of the different special
effects, first using pictures containing text, then pictures
loaded from photographs, then both at once.
|
||||||||||||||||||||||||||||||||||||||||||||||
Status | Exported qualified. This means that you can only call the function by calling Pic.DrawSpecial, not by calling DrawSpecial.
| ||||||||||||||||||||||||||||||||||||||||||||||
See also | Pic.Draw for information on the meaning
of the mode argument. Pic.DrawSpecialBack for information on how to continue executing the program while a special effect is occurring. This allows one to produce several special effects at once.
|