Subversion Repositories svnkaklik

Rev

Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
unit Unit1;
2
 
3
interface
4
 
5
uses
6
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7
  Dialogs, ExtCtrls, StdCtrls;
8
 
9
type
10
  PoleTeplot = array [1..544] of byte;
11
 
12
type
13
  TTeplomer = class(TForm)
14
    PaintBox1: TPaintBox;
15
    Button1: TButton;
16
    procedure Button1Click(Sender: TObject);
17
  private
18
    { Private declarations }
19
  public
20
    { Public declarations }
21
  end;
22
 
23
var
24
  Teplomer: TTeplomer;
25
  Teplota: PoleTeplot;
26
 
27
const
28
  sirka = 473;
29
  vyska = 256;
30
 
31
implementation
32
 
33
{$R *.dfm}
34
 
35
procedure TTeplomer.Button1Click(Sender: TObject);
36
var
37
  i: byte;
38
  n: integer;
39
begin
40
 i:=0;
41
 
42
 for n:=1 to sirka do
43
 begin
44
   Teplota[n] := i;
45
   i:=i+1;
46
 end;
47
 PaintBox1.Canvas.brush.color := clWhite;
48
 PaintBox1.Canvas.Rectangle(0,0,sirka,vyska);
49
 for n:=1 to sirka do
50
  PaintBox1.Canvas.Pixels[n,Teplota[n]] := clBlack;
51
end;
52
 
53
end.