⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unit11.cpp

📁 05年毕业设计(BC)-图像处理软件及完整源代码
💻 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 + -