unit Unit1; interface usesSysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,Forms, Dialogs; typeTForm1 = class(TForm)procedure FormCreate(Sender: TObject);procedure FormPaint(Sender: TObject);private{ Private declarations }public{ Public declarations }end; varForm1: TForm1;Bitmap: TBitmap; implementation {$R *.DFM} procedure TForm1.FormCreate(Sender: TObject);beginBitmap := TBitmap.Create;Bitmap.LoadFromFile('C:\WINDOWS\cars.BMP');end; procedure TForm1.FormPaint(Sender: TObject);varX, Y, W, H: LongInt;beginwith Bitmap do beginW := Width;H := Height;end;Y := 0;while Y < Height do beginX := 0;while X < Width do beginCanvas.Draw(X, Y, Bitmap);Inc(X, W);end;Inc(Y, H);end;end; end. |
[000935]