Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

setShapeScale()

Purpose

Sets a scale multiplier to a supplied shape

Description

Used to apply a scale multiplier to a shape drawn with drawShape()

Syntax

setShapeScale( shape, scale )
setShapeScale( shape, scaleX, scaleY )

Arguments

shape Handle which stores the shape in question

scale Vector which describes the x and y scale to be applied to the shape

scaleX Float scale multiplier to be applied to the horizontal axis of the shape

scaleY Float scale multiplier to be applied to the veritcal axis of the shape

Example

gw = gWidth()
gh = gHeight()

shape = createBox( gw/2, gh/2, gw/2, gh/2 )
scale = { 1, 1 }

loop
    clear()
    j = controls( 0 )
    scale += { j.lx, j.ly } * 0.05
    setShapeScale( shape, scale ) 
    drawShape( shape )
    printAt( 0, 1, "Move the left control stick to adjust scale" )
    printAt( 0, 3, "Current scale: ", scale )
    update()
repeat

Associated Commands

copyShape(), createBox(), 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(), 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.