Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

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

clear(), gHeight(), setDrawTarget(), setMode(), update()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.