. . .
: TChart. .
1 Seriesk?
2 NChart
3
4 ?
5 , ColorGrid
1. TChart
: , ___________ [Xmin..Xmax]. , .
, __. TEdit. TChart , Additional .
_________________________________________________).
Titles : ".
Axis . ______________________________________________
EditingChart _________________________________.
. Chart1.BottomAxis Automatic False, .
TForm1.Button1Click " ". TForm1.Button2Click " ". (X, Y) Seriesk
Series1.AddXY(Const AXValue, AYValue: Double; Const AXLabel: String; AColor: TColor): Longint,
AXValue, AYValue - X Y; AXLabel ; AColor ( clTeeColor, , ).
:
2
1
1.. Delphi .
2.. , :
13.3
3.. onClick :
with PaintBox1.Canvas do // PaintBox1
begin
Brush.Color:=clRed; //
|
|
Brush.Style:=bsFDiagonal; //
Pen.Color:=clBlue; //
Pen.Width:=4; //
Ellipse(10,10,100,100); //
end;
4.. , 1. , ( , , ). , :
with PaintBox1.Canvas do // PaintBox1
begin
......... // -
......... // -
......... // -
......... // 3
Ellipse(10,10,100,100); //
end;
5. , . . :
with PaintBox1.Canvas do // PaintBox1
begin
Brush.Color:=clGreen; //
Brush.Style:=bsSolid; //
Rectangle(10,10,100,100); //
end;
6. (F9) , , .
7. , , , . , , PaintBox1:
Brush.color:=clWhite;
Rectangle(0,0,PaintBox1.Width,PaintBox1.Height);
Button1
Panel1
PaintBox1 ( . System)
8. .
9. 2. , :
with PaintBox1.Canvas do // PaintBox1
begin
Brush.color:=clWhite; //
Rectangle(0,0,PaintBox1.Width,PaintBox1.Height);
// ,
............
Rectangle(10,10,100,100); //
// 2,
............
Ellipse(100,10,200,100); //
end;
10. , :
18. Delphi
19. PaintBox (. System). .
20. :
var i:integer;
begin
Randomize;
with PaintBox1.Canvas do // ,
begin
for i:=15 downto 1 do //15 15
begin
Brush.Color:=random(color); //
ellipse(100-5*i,100-5*i,100+5*i,100+5*i); //
end;
end;
Brush.Color:=random(color);
Brush.Color:=RGB(random(255),random(255),random(255));
|
|
.
,
Brush.Color:=RGB(random(255),random(255),random(255));
Brush.Color:=RGB(random(255),0,0);
.
21 Delphi PaintBox. :
const r=15;
var x:real;y0:integer;
begin
y0:=100; x:=0;
with PaintBox1.Canvas do
begin
while x<PaintBox1.Width do begin
brush.Color:=clred;
Ellipse(round(x-r), y0-r, round(x+r),y0+r);
Pen.Color:=clBtnFace;
Ellipse(round(x-r), y0-r, round(x+r),y0+r);
x:=x+0.1;
end;
end; end;
.
1: , ().