scaleShape()
Purpose
Sets a scale direction to be applied to a shape
Description
Used to apply a scale direction to a shape drawn with drawShape()
Syntax
scaleShape( shape, scale )
scaleShape( shape, dirX, dirY )
Arguments
shape Handle which stores the shape in question
scale Vector which describes the x and y scale direction to be applied to the shape
scaleX Float scale direction to be applied to the horizontal axis of the shape
scaleY Float scale direction to be applied to the veritcal axis of the shape
Example
gw = gWidth()
gh = gHeight()
shape = createBox( gw/2, gh/2, gw/4. gh/4 )
setShapeColour( shape, bisque )
loop
clear()
c = controls( 0 )
scaleShape( shape, { c.lx, c.ly } * 0.1 )
drawShape( shape )
printAt( 0, 0, "Use left control stick to change shape 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(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()