Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

createBox()

Purpose

Creates a box (rectangle) to be drawn with drawShape()

Description

Creates a box with centre origin to be drawn at the specified x and y location with the specified width and height

Syntax

shape = createBox( x, y, width, height )

Arguments

shape Handle which stores the newly created shape

x Horizontal screen position in pixels

y Vertical screen position in pixels

width Width in pixels

height Height in pixels

Example

// draw a multicoloured rectangle on the screen
box_1 = createBox( gwidth() / 2, gheight() / 2, gwidth(), gheight() )

setVertexColour( box_1, 0, bisque )
setVertexColour( box_1, 1, cyan )
setVertexColour( box_1, 2, fuzeblue )
setVertexColour( box_1, 3, fuzepink )

drawShape( box_1 )
update()
sleep( 3 )

Associated Commands

copyShape(), createCircle(), createCurve(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()

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.