gr.OPEN 255,0,0,0,0,1 GR.SET.ANTIALIAS 0 GR.SCREEN sw,sh scr_w= sw/64 scr_h= sh/88 GR.SCALE scr_w, scr_h !GR.SCALE.TOUCH scr_w, scr_h, 0,0, 1 GR.BITMAP.LOAD bmp,"cartman.png" GR.BITMAP.SIZE bmp, bw,bh GR.COLOR 255,0,255,0,1 GR.TEXT.SIZE 10 GR.TEXT.DRAW txt,10,20,"meet" GR.TEXT.DRAW txt,16,30,"the" GR.TEXT.DRAW txt,8,40,"eraser" GR.BITMAP.DRAW bmp_obj, bmp,0,0 GR.RENDER DO DO GR.TOUCH tch, tx,ty IF !tch THEN PAUSE 25 UNTIL tch tx= INT(tx/scr_w) ty= INT(ty/scr_h) GR.BITMAP.CREATE bmpA, bw,bh GR.BITMAP.DRAWINTO.START bmpA FOR y= 0 TO bh-1 FOR x= 0 TO bw-1 GR.GET.BMPIXEL bmp, x, y, alpha, red, green, blue IF xtx+2 | yty+2 & alpha THEN GR.COLOR alpha, red, green, blue GR.POINT pt, x,y ENDIF NEXT x NEXT y GR.BITMAP.DRAWINTO.END GR.MODIFY bmp_obj,"bitmap", bmpA GR.BITMAP.SAVE bmpA,"bmp.png" GR.BITMAP.LOAD bmp,"bmp.png" GR.RENDER UNTIL 0