USES graph,crt,my_unit; const n=16; Type smaylo=array [1..n,1..n] of byte; Procedure initm; var x,y:word; lb,mb,rb:boolean; b,err:byte; begin initmouse(b,err); setmousexy(0,0); mouseon; end; Procedure initgr; var gd,gm:integer; begin gd:=detect; initgraph(gd,gm,''); SetTextStyle(smallfont, HorizDir, 6); setcolor(11); outtext('0,11-prozrachniy cvet') end; Procedure theend; label 1; var f:text; s:string; i,j,c:byte; begin mouseoff; 1: outtextxy(500,500,'input file name *.mys:'); readln(s); assign(f,s); rewrite(f) ; for i:= 1 to n do begin for j:= 1 to n do begin c:=getpixel(+1+j*20,+1+i*20); if c=0 then c:=11; if c<10 then write(f,'0',c) else write(f,'',c); end; writeln(f,''); end; close(f); closegraph; halt; end; var xl,yl,x,y:word; lb,rb,tb:boolean; i:byte; begin xl:=25; yl:=25; initgr; setmousexy(1,1); For i := 1 to n+1 do {goriz} line(i*20,20,i*20,340); For i := 1 to n+1 do {vert} line(20,i*20,340,i*20); For i := 1 to n-1 do if i <> 11 then begin outtextxy(350,i*20,inttostr(i)); outtextxy(370,i*20,chr(i+ord('a'))); end; setmousexy(xl,yl); repeat if keypressed then i:=ord(readkey); if i-97<>11 then begin setcolor(i-97); setfillstyle(1,i-97); end; getmousexy(x,y,lb,rb,tb); if (x<25) or (x>335) or (y<25) or (y>335) then setmousexy(xl,yl); xl:=x; yl:=y; if lb=true then begin mouseoff; floodfill(x,y,11); mouseon; end; if rb=true then begin mouseoff; setfillstyle(1,0); floodfill(x,y,11); mouseon; end; setfillstyle(1,0); bar(350,350,550,450); outtextxy(350,400,inttostr(x)); outtextxy(380,400,inttostr(y)); until i=27; theend end.