unit11.cpp
来自「毕业设计图像处理软件及源代码对毕业生会有所帮助」· C++ 代码 · 共 85 行
CPP
85 行
//---------------------------------------------------------------------------
#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 + =
减小字号Ctrl + -
显示快捷键?