DrawScript
Rotations
DrawScript allows you rotate line-drawings, sprites and text. The following example rotates the "switcher" icon from the wimp prite-pool
x=4 : y=4
FOR i=1 TO 8
·Rotate(PI/4,x,y)
·SpritePlot("switcher",x+1,y)
NEXT
|
Objects which are rotated can themselves be rotated as the following example shows
FOR i=1 TO 8
·Rotate(PI/4,7,7)
PROCSpriteCircle(10,10)
NEXT
END
DEF PROCSpriteCircle(x,y)
LOCAL a,b,c,d,e,f,i
·GetTransform(a,b,c,d,e,f)
FOR i=1 TO 8
·Rotate(PI/4,x,y)
·SpritePlot("!drawscrpt",x+1,y)
NEXT
·SetTransform(a,b,c,d,e,f)
ENDPROC
|
|