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()