Graphics
Opens a 2D graphics display.
Graphics ( width,height[,depth][,mode] )
Parameters
- width
- how many pixels across.
- height
- how many pixels down.
- depth (optional)
- accepted for older programs; ArcBasic always uses full 32-bit colour.
- mode (optional)
- 0 opens a window when run from the editor and fills the screen in a finished game, 1 always fills the screen, 2 always opens a window, and 3 opens a window the player can resize, with the picture scaled to fit.
Description
Opens a display for 2D drawing, a given number of pixels wide and high, and clears it to black. Drawing commands then work in that grid, with 0,0 at the top-left corner and y counting down. The picture is scaled to fit the window or screen, keeping its shape, so a small resolution gives big chunky pixels. Drawing starts on the visible front buffer, and the colour is white. For animation without flicker, use SetBuffer BackBuffer() and Flip each frame.
