gWidth()
Purpose
Get the width of the screen display
Description
Returns the number of horizontal pixels in the screen display
Syntax
width = gWidth( )
Arguments
width The width of the screen display in pixels
Example
// Scale an image to fit to the screen
img = loadImage( "Colin Brown/DungeonB", false )
size = imageSize( img )
scale = min( gWidth() / size.x, gHeight() / size.y )
drawImage( img, 0, 0, scale )
update()
sleep( 3 )
Associated Commands