📄 unit1.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "math.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
#define PI=3.1415926 ;
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
Width = 640;
Height = 480;
Canvas->Pen->Color = clTeal;
Canvas->Brush->Style = bsClear ;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormPaint(TObject *Sender)
{
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);
}
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -