Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setDrawTarget()

Purpose

Sets the target of draw commands

Description

Sets the target of draw commands to be an image or the framebuffer

Syntax

setDrawTarget( target )

Arguments

target handle of an image created with createimage or framebuffer for the screen

Example

w = 200
// Create a tile
img = createImage( w, w, true, image_rgb )
setDrawTarget( img )
box( 0, 0, w, w, red, 0 )
box( 0, w/2, w - 1, w / 2, white, 1 )
line( { w / 2 }, { w / 2, w / 2 }, white )
// draw tiles on the screen
setDrawTarget( frameBuffer )
for y = 1 to gHeight() step w loop
    for x = 1 to gWidth() step w loop
        drawImage( img, x, y, 1 )
        update()
        sleep( 0.2 )
    repeat
repeat
sleep( 3 )

Associated Commands

clear(), gHeight(), gWidth(), getDrawTarget(), 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.