yflippixmap.bmx 465 B

1234567891011121314151617181920212223242526
  1. SuperStrict
  2. Graphics 640,480
  3. Local pix:TPixmap=LoadPixmap(blitzmaxpath()+"\samples\hitoro\gfx\boing.png")
  4. If pix = Null Then
  5. RuntimeError ("Error Loading Image")
  6. End If
  7. Repeat
  8. Cls
  9. DrawText "Press Key X or Y to change Orientation" , 10 , 10
  10. ' Change pixmap orientation
  11. If KeyHit(KEY_X) Then
  12. pix = XFlipPixmap(pix)
  13. End If
  14. If KeyHit(KEY_Y) Then
  15. pix = YFlipPixmap(pix)
  16. End If
  17. DrawPixmap pix,50,50
  18. Flip
  19. Until KeyHit(key_escape) Or AppTerminate()