Rotating a Rect Around Its Center?

BlitzMax Forums/BlitzMax Beginners Area/Rotating a Rect Around Its Center?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

adding a couple of loop statements to the code makes an interesting effect

Graphics 800,600
x=200
y=50
sizex=20
sizey=20
Repeat
x:+1
a:+2
If a>359 Then a=0

SetRotation a
SetHandle sizex/2,sizey/2

SetColor 255,100,100
For loopx = 0 To -500 Step -25
For loop = 0 To 500 Step 25
DrawRect x+loopx,y+loop,sizex,sizey
Next
Next


SetHandle 0,0
SetRotation 0

Flip
Cls

If KeyHit(key_escape) Then End
Forever