Pic.Draw | Part of Pic module |
Syntax | Pic.Draw (picID, x, y, mode : int)
| ||||||||||||
Description | Pic.Draw is used to draw a picture on the screen. The picture
is drawn with the lower left corner at (x, y). The mode parameter has one of the following values:
| ||||||||||||
Execute | |||||||||||||
Details | If the Pic.Draw 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 graphic on the screen and then repeats it 50
times in random positions.
var picID: int var x, y : int Draw.FillBox (50, 50, 150, 150, red) Draw.FillStar (50, 50, 150, 150, green) Draw.FillOval (100, 100, 30, 30, blue) picID := Pic.New (50, 50, 150, 150) for i : 1 .. 50 x := Rand.Int (0, maxx) % Random x y := Rand.Int (0, maxy) % Random y Pic.Draw (picID, x, y, picCopy) end for Pic.Free (picID) | ||||||||||||
Execute | |||||||||||||
Status | Exported qualified. This means that you can only call the function by calling Pic.Draw, not by calling Draw.
| ||||||||||||
See also | View.Update for information on how
to produce smooth animation. Pic.DrawSpecial for information on how to make pictures appear using special effects such as wipes and slides. Pic.DrawFrames for information on how to display multiple frame images such as are obtained from GIF files. |