unit Mramor;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
   procedure FormPaint(Sender: TObject);
   procedure FormResize(Sender: TObject);
private
  { Private declarations }
public
  { Public declarations }
end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormPaint(Sender: TObject);
var
  h, w, i, j: Integer;
  Rect1, Rect2: TRect;
begin
  h := Form1.Height div 10;
  w := Form1.Width div 10;
  with Form1.Canvas do
  begin
   for j := 0 to h do
    for i := 0 to w do
     Pixels[i,j]:=Trunc(Random($00000095));
    Rect1 := Rect(0, 0, w, h);
    for j := 0 to 9 do
    begin
     for i := 0 to 9 do
     begin
      Rect2 := Rect(w*j, h*i, w*(j+1), h*(i+1));
      CopyRect(Rect2, Form1.Canvas, Rect1);
     end;
    end;
  end;
end;

procedure TForm1.FormResize(Sender: TObject);
begin
  paint;
end;

end.

Копирайт © 2007, Lanselot. Все права защищены.

Используются технологии uCoz