getShapeScale()
Purpose
Find the current scale multiplier of a shape drawn with drawShape()
Description
Returns a vector describing the current scale multiplier of a supplied shape
Syntax
scale = getShapeScale( shape )
Arguments
shape Handle which stores the shape in question
scale Vector which describes the x and y scale multiplier of the shape
Example
shape = createBox( gwidth() / 2, gheight() / 2, gwidth()/2, gheight()/2 )
setShapeColour(shape, white)
boxScale = {1, 1}
loop
clear()
j = controls(0)
boxScale += {j.rx, -j.ry} * 0.05
setShapeScale(shape, boxScale)
scale = getShapeScale(shape)
printAt(0, 2, "X Scale: ", scale.x)
printAt(0, 3, "Y Scale: ", scale.y)
drawShape(shape)
printAt(0, 0, "Move the right stick to change scale values")
update()
repeat
Associated Commands
copyShape(), createBox(), createCircle(), createCurve(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeRotation(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()