1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70:
| unit Auto1;
interface
uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;
type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Button4: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button4Click(Sender: TObject); private public end;
var Form1: TForm1; x, y, Dicke, i: Integer; Quelle, Ziel: TRect; implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject); begin Canvas.Brush.Color:=clred; Canvas.Rectangle (120, 120, 160, 140); Canvas.Brush.Color:=clblack; Canvas.Ellipse (122, 132, 135, 148); Canvas.Ellipse (145, 132, 158, 148); Canvas.MoveTo (120, 120); Canvas.LineTo (125, 105); Canvas.LineTo (140, 105); Canvas.LineTo (150, 120);
Canvas.Brush.Color:=clred; Canvas.Rectangle (120, 180, 160, 200); Canvas.Brush.Color:=clblack; Canvas.Ellipse (122, 192, 135, 208); Canvas.Ellipse (145, 192, 158, 208); Canvas.MoveTo (120, 180); Canvas.LineTo (125, 165); Canvas.LineTo (140, 165); Canvas.LineTo (150, 180); end;
procedure TForm1.Button2Click(Sender: TObject); begin Refresh; end;
procedure TForm1.Button4Click(Sender: TObject); begin for i := 1 to 550 do begin Quelle := Rect (50, 50, 600, 300); <span style="color: red">Ziel := Rect (i+50, 50, 600+i, 300);</span> Canvas.CopyRect (Ziel, Canvas, Quelle); sleep (75); end; end; end. |