Subversion Repositories svnkaklik

Rev

Blame | Last modification | View Log | Download

unit Unit1;

interface

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

type
  PoleTeplot = array [1..544] of byte;

type
  TTeplomer = class(TForm)
    PaintBox1: TPaintBox;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Teplomer: TTeplomer;
  Teplota: PoleTeplot;

const
  sirka = 473;
  vyska = 256;

implementation

{$R *.dfm}

procedure TTeplomer.Button1Click(Sender: TObject);
var
  i: byte;
  n: integer;
begin
 i:=0;

 for n:=1 to sirka do
 begin
   Teplota[n] := i;
   i:=i+1;
 end;
 PaintBox1.Canvas.brush.color := clWhite;
 PaintBox1.Canvas.Rectangle(0,0,sirka,vyska);
 for n:=1 to sirka do
  PaintBox1.Canvas.Pixels[n,Teplota[n]] := clBlack;
end;

end.