Guest User

Untitled

a guest
Jun 25th, 2018
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Graphics 800, 600, 0, 60
  2. AutoMidHandle True
  3. Local img:TImage = LoadImage("test.png")
  4. Local angle:Int = 0
  5. Local textX:Int = -img.width / 2 + 10
  6. Local textY:Int = -img.height / 2 + 10
  7. Local imgX:Int = img.width * 2
  8. Local imgY:Int = img.height * 2
  9.  
  10. While Not AppTerminate() And Not KeyHit(KEY_ESCAPE)
  11.     Cls
  12.     SetColor 255, 255, 255
  13.    
  14.     ' rotate
  15.     SetRotation angle
  16.     ' draw image at 0, 0
  17.     DrawImage img, imgX, imgY
  18.     ' draw text, calculating offset
  19.     DrawText "Foo", imgX + Cos(angle) * textX - Sin(angle) * textY, imgY + Cos(angle) * textX + Sin(angle) * textY
  20.    
  21.     Flip 1
  22.     angle:+1
  23.     PollEvent
  24. Wend
Add Comment
Please, Sign In to add comment