我的程序出问题了,请大侠指点!(100分)

  • 主题发起人 主题发起人 问题猫
  • 开始时间 开始时间

问题猫

Unregistered / Unconfirmed
GUEST, unregistred user!
出错信息:
Not enough actual parameters
好象是说我的函数实参不够。(错误指在红色处)
但我看不出来啊,
请大侠指点!


unit SMITH;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls,Math, ComCtrls, ToolWin, Menus, jpeg;

type
TForm1 = class(TForm)
MainMenu1: TMainMenu;
PopupMenu1: TPopupMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
ToolBar1: TToolBar;
SpeedButton1: TSpeedButton;
SpeedButton2: TSpeedButton;
Panel1: TPanel;
Image1: TImage;
Panel2: TPanel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Edit9: TEdit;
Edit10: TEdit;
Edit11: TEdit;
Edit12: TEdit;
Edit13: TEdit;
BitBtn3: TBitBtn;
Panel3: TPanel;
StatusBar1: TStatusBar;
Panel4: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure DrawArc(x: Extended;y: Extended;r: Extended;Q1: Extended;Q2: Extended);
end;

var
Form1: TForm1;
const PI = 3.14159;

implementation

{$R *.dfm}
procedure TForm1.DrawArc(x: Extended;y: Extended;r: Extended;Q1: Extended;Q2: Extended);
//画圆弧; (x,y):圆心坐标; r:半径; Q1:启始角度; Q2:终止角度
var
fx1,fy1,fx2,fy2,fx3,fy3,fx4,fy4: Extended;
x1,y1,x2,y2,x3,y3,x4,y4: Integer;
begin
fx1:=x-r;
fy1:=y-r;
fx2:=x+r;
fy2:=y+r;
fx3:=x+r*cos(Q1);
fy3:=y-r*sin(Q1);
fx4:=x+r*cos(Q2);
fy4:=y-r*sin(Q2);

x1:=round(fx1);
x2:=round(fx2);
x3:=round(fx3);
x4:=round(fx4);
y1:=round(fy1);
y2:=round(fy2);
y3:=round(fy3);
y4:=round(fy4);

Image1.Canvas.Arc(x1,y1,x2,y2,x3,y3,x4,y4);

end;

procedure TForm1.BitBtn1Click(Sender: TObject);
var
x,y,r,Q1,Q2: Extended;
begin
x:=StrToInt(Edit9.Text)+200;
y:=StrToInt(Edit10.Text)+200;
r:=StrToInt(Edit11.Text);
Q1:=(StrToInt(Edit12.Text)/180)*PI ;
Q2:=(StrToInt(Edit13.Text)/180)*PI ;

[red]DrawArc(x;y;r;Q1;Q2);[/red]end;

procedure TForm1.N4Click(Sender: TObject);
begin
close;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin

Image1.Width:=400;
Image1.Height:=400;
Image1.Canvas.MoveTo(0,200);
Image1.Canvas.LineTo(400,200);
Image1.Canvas.LineTo(392,197);
Image1.Canvas.MoveTo(400,200);
Image1.Canvas.LineTo(392,203);
Image1.Canvas.MoveTo(200,400);
Image1.Canvas.LineTo(200,0);
Image1.Canvas.LineTo(197,8);
Image1.Canvas.MoveTo(200,0);
Image1.Canvas.LineTo(203,8);
end;

end.
 
DrawArc(x,y,r,Q1,Q2);
逗号间隔呀。
 
同意 yzhshi;
来迟了!
 
多谢两位
问题解决了[^][:D]
 
后退
顶部