; MidHandle Example ; ----------------- Graphics 640,480,0,2 SetBuffer BackBuffer() player=LoadImage("media/player.bmp") mid=0 While Not KeyDown(1) Cls ; Space toggles the handle between top-left (default) and centre If KeyHit(57) Then mid=1-mid If mid=1 Then MidHandle player ; move the handle to the image centre Else HandleImage player,0,0 ; back to the default top-left handle End If End If ; A crosshair marks the exact point the image is drawn at x=MouseX() y=MouseY() DrawImage player,x,y Color 255,255,0 Line x-10,y,x+10,y Line x,y-10,x,y+10 Text 0,0,"Move mouse Space: toggle MidHandle Esc: exit" If mid=1 Then Text 0,20,"MidHandle player - the ship is centred on the crosshair" Else Text 0,20,"Default handle 0,0 - the ship hangs below-right of the crosshair" End If Flip Wend End