📄 unit11.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit11.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm11 *Form11;
extern int iReturnValue;
extern int iSunDirection; //浮雕效果中的光方向
extern int iSunConstant;
//---------------------------------------------------------------------------
__fastcall TForm11::TForm11(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm11::BitBtn2Click(TObject *Sender)
{
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm11::FormShow(TObject *Sender)
{
iReturnValue=0;
iSunDirection=1;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::BitBtn1Click(TObject *Sender)
{
iSunConstant=StrToInt(Edit1->Text);
if(iSunConstant<0||iSunConstant>255)
{
MessageBox(NULL,"输入的灰度值错误!","error!",MB_OK);
return;
}
iReturnValue=1;
this->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton5Click(TObject *Sender)
{
iSunDirection=1;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton8Click(TObject *Sender)
{
iSunDirection=2;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton7Click(TObject *Sender)
{
iSunDirection=3;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton6Click(TObject *Sender)
{
iSunDirection=4;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton4Click(TObject *Sender)
{
iSunDirection=5;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton1Click(TObject *Sender)
{
iSunDirection=6;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton2Click(TObject *Sender)
{
iSunDirection=7;
}
//---------------------------------------------------------------------------
void __fastcall TForm11::SpeedButton3Click(TObject *Sender)
{
iSunDirection=8;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -