; DrawBlock Example ; ----------------- Graphics 640,480,0,2 SetBuffer BackBuffer() ; Ship sprite - the pixels around the ship are the mask colour (black) player=LoadImage("media/player.bmp") While Not KeyDown(1) Cls ; A chequered backdrop so transparency (or the lack of it) is obvious Color 40,40,90 For y=0 To 460 Step 20 For x=0 To 620 Step 20 If ((x+y)/20) Mod 2=0 Then Rect x,y,20,20,True Next Next ; DrawImage honours the mask; DrawBlock draws every pixel, mask included DrawImage player,MouseX()-60,MouseY() DrawBlock player,MouseX()+28,MouseY() Text MouseX()-44,MouseY()+44,"DrawImage",True Text MouseX()+44,MouseY()+44,"DrawBlock",True Text 0,0,"Move the mouse Esc: exit" Text 0,20,"DrawBlock ignores the mask - the black box around the ship is drawn too" Flip Wend End