unit Unit1; interface uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Menus; type TForm1 = class(TForm) PopupMenu1: TPopupMenu; kicsinyit1: TMenuItem; procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure FormClick(Sender: TObject); procedure kicsinyit1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.DFM} procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if (x<=80) and (y<=80) then form1.canvas.lineto(x,y); end; procedure TForm1.FormClick(Sender: TObject); var i,j:integer; begin for i:=1 to 80 do begin for j:=1 to 80 do begin form1.canvas.pixels[80+2*i,80+2*j]:=form1.canvas.pixels[i,j]; form1.canvas.pixels[81+2*i,81+2*j]:=((form1.canvas.pixels[i,j]+form1.canvas.pixels[i+1,j+1])div 2); form1.canvas.pixels[i,j]:=form1.color; end; end; end; procedure TForm1.kicsinyit1Click(Sender: TObject); var i,j:integer; begin for i:=1 to 40 do begin for j:=1 to 40 do begin form1.canvas.pixels[i,j]:=form1.canvas.pixels[80+2*i,80+2*j]; end; end; end; end.