Rotating Polygons
Richmond Mathewson
richmondmathewson at gmail.com
Wed Sep 30 18:01:51 EDT 2009
BNig wrote:
> Richmond,
>
> you might want to try to put
>
> on scrollbarddrag scrollbarDragValue
> revRotatePoly the long ID of grc "SQUIGGLE", scrollbarDragValue
> end scrollbardrag
>
> into a scrollbar and scroll a couple of times from 0 to 360 and back.
>
> Robert is up to a stable rotate
>
> regards
> Bernd
>
>
>
Presumably what you mean by "a stable rotate" is that the polygon does
not get distorted
as it rotates.
This:
on mouseUp
repeat for 360 times
revRotatePoly the long ID of grc "gXXX", 1
end repeat
end mouseUp
ends up making the graphic unrecognisable.
I tried this:
on mouseUp
set the moveSpeed to 65000
repeat for 360 times
revRotatePoly the long ID of grc "gXXX", 1
set the lockScreen to true
set the width of grc "gXXX" to 300
set the height of grc "gXXX" to 300
move grc "gXXX" to 300,300
set the lockScreen to false
end repeat
end mouseUp
and the effect is really horrible insofar as the polygon gets badly
transformed.
>
> Richmond Mathewson-2 wrote:
>
>> I just have been reading Robert Cailliau's page:
>>
>>
>> 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.
>>
>>
It would make things a lot simpler if Cailliau explicitly stated what he
meant by "rotate".
More information about the use-livecode
mailing list