主题:请问为什么?(初学者)
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include<math.h>
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{ Canvas->Pen->Color=clTeal;
Canvas->Brush->Style=bsClear;
double AL,x1,y1,x2,y2;
int L=120;
for(int i=0;i<48;i++)
AL=i*M_PI/24;
x1=L*cos(AL);
y1=L*sin(AL);
x2=x1+320;
y2=-y1+240;
Canvas->Ellipse(x2-90,y2-90,x2+90,y2+90);
}
我看了别人写的文章,怎么我写的不能绘出图形?
#include <vcl.h>
#pragma hdrstop
#include<math.h>
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{ Canvas->Pen->Color=clTeal;
Canvas->Brush->Style=bsClear;
double AL,x1,y1,x2,y2;
int L=120;
for(int i=0;i<48;i++)
AL=i*M_PI/24;
x1=L*cos(AL);
y1=L*sin(AL);
x2=x1+320;
y2=-y1+240;
Canvas->Ellipse(x2-90,y2-90,x2+90,y2+90);
}
我看了别人写的文章,怎么我写的不能绘出图形?