Grafiikka : komennot

DRAWTOSCREEN


   KUVAUS

Tämä komento ohjaa kaikki piirtokomennot - mukaan lukien kuvat, tekstin ja pelimaailman takaisin näytölle sen jälkeen kun et enää halua jatkaa kuvaan piirtämistä (komento DrawToImage).

   KÄYTTÖ
DRAWTOSCREEN

Katso myös: DRAWTOIMAGE

   ESIMERKKI
themap=LoadImage("Media/map.bmp")

angle=0

While Not EscapeKey()

    Cls

    'Draw the map to mouse coordinates
    DrawImage themap,MouseX() -200,MouseY() -150

    'Manipulate image every second
    If TIMER()>moment+1000 Then

        DrawToImage themap

        'red filled circle
        Color 255,0,0
        Circle 200+Cos(angle)*100-5,150-Sin(angle)*100-5,10

        'black hollow circle (outlines)
        Color 0,0,0
        Circle 200+Cos(angle)*100-5,150-Sin(angle)*100-5,10,OFF

        angle=angle+10

        moment=TIMER()

        'set drawing back to screen
        DrawToScreen

    EndIf

    'Let's see what we have here
    DrawScreen

Wend

End

<<TAKAISIN