Rotating Polygons
Richmond Mathewson
richmondmathewson at gmail.com
Wed Sep 30 16:24:39 EDT 2009
I just have been reading Robert Cailliau's page:
http://www.robertcailliau.eu/Programming/Revolution/Tutorials/zTutorials.html
I popped together a stack containing a Heptagonal regular
polygon and popped this in a button:
on mouseUp
set the Angle of grc "HEPT" to 45
end mouseUp
in RunRev 4 that seems to work perfectly well ...
also works perfectly in Dreamcard 2.6.1 ....
This doesn't work for a a non-regular polygon graphic:
Cailliau claims:
"Unlike images, polygons cannot be directly rotated in Revolution. They
have no "angle" property."
http://www.robertcailliau.eu/Programming/Revolution/Tutorials/PolygonRotation/zPolygonRotation.html
the second part of which is plain WRONG; one can set the ANGLE of an
irregular polygon, it just doesn't
have any affect.
HOWEVER, the Documentation explicitly details revRotatePoly:
on mouseUp
revRotatePoly the long ID of grc "SQUIGGLE", 60
end mouseUp
which is a lot simpler than getting misled by Cailliau's stuff about
having to use all sorts of complicated
custom properties.
More information about the use-livecode
mailing list