getShapeRotation()
Purpose
Find the rotation of a shape in degrees or radians
Description
Returns the amount of rotation applied to a shape drawn with drawShape()
Syntax
rotation = getShapeRotation( shape )
Arguments
shape Handle which stores the shape in question
rotation Handle which stores the amount of rotation applied to the supplied shape
Example
r = gheight() / 2
a = 0
points = []
for i = 0 to 20 loop
x = gwidth()/2 + cos(a) * r
y = gheight()/2 + sin(a) * r
points[i] = {x, y}
r -= 30
a += 36
repeat
lineStrip = createLineStrip(points)
setShapeColour(lineStrip, white)
loop
clear()
rotateShape(lineStrip, 1)
rotation = getShapeRotation(lineStrip)
drawShape(lineStrip)
print(rotation)
update()
repeat
Associated Commands
copyShape(), createBox(), createCircle(), createCurve(), createLine(), createLineStrip(), createPoly(), createStar(), createTriangle(), deleteShape(), drawShape(), getShapeBounds(), getShapeLocation(), getShapeScale(), getShapeTint(), getVertex(), getVertexColour(), getVertexLineColour(), getVertexLineThickness(), joinShapes(), moveShape(), numVerts(), rotateShape(), scaleShape(), setShapeColour(), setShapeLineStyle(), setShapeRotation(), setShapeScale(), setShapeScaleModeLocal(), setShapeTint(), setVertex(), setVertexColour(), setVertexLineStyle()