jhurley at infostations.com
Sun Feb 22 17:24:17 CST 2004
>The tmpanel loaded and is very nicely designed, but the contents come
>up with a lot of html tags and the only live url is for the first demo.
> looks like some great stuff in here hiding among the tags.
>On Feb 22, 2004, at 12:28 PM, Scott Rossi wrote:
This issue has been on the list before. The following script may be
helpful. It will rotate an arbitrary set of graphic points through an
arbitrary angle. A number of people contributed to it.
I have used a button name "Pivot", with a grab me handler, to use as
the point of rotation.
--Rotate a polygon "myPoly" about a button "Pivot" by 45 degrees
rotatePoly "myPoly",the loc of button "Pivot", 45
On rotatePoly theGraphic, thePivot, theAngle
put the points of graphic theGraphic into tPoints
put item 1 of thePivot into xPivot
put item 2 of thePivot into yPivot
put empty into newPointList
--Set points relative to pivot
repeat for each line tLine in tPoints
put (item 1 of tLine)- xPivot & "," & (item 2 of tLine)- yPivot &
return after tRelPoints
put sin(theAngle* pi/180) into S
put cos(theAngle * pi/180) into C
--Rotate coordinate axes
repeat for each line tLine in tRelPoints
put round(C*(item 1 of tLine)+ S*(item 2 of tLine) + xPivot)&
comma after rotPtlist
put round(-S*(item 1 of tLine) + C*(item 2 of tLine)+
put return after rotPtList
set the points of graphic theGraphic to rotPtlist
More information about the use-livecode