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

📄 unit1.~cpp

📁 毕业设计图像处理软件及源代码对毕业生会有所帮助
💻 ~CPP
📖 第 1 页 / 共 3 页
字号:
//---------------------------------------------------------------------------
//设置画板的光标
void TForm1::setcur(int iCurOrder)
{
        if(!bForm2Null[iActForm2])
                fForm2Array[iActForm2]->Image1->Cursor=iCurOrder;
}
//设置图象恢复和重做---------------------------------------------------------
void TForm1::f_Form2DoHistroy(int iSpace)
{
        if(!bForm2Null[iActForm2])
        {
                fForm2Array[iActForm2]->iPicNow=(fForm2Array[iActForm2]->iPicEnd+iSpace)%iForm2PicNum;
                fForm2Array[iActForm2]->Image1->Picture->Bitmap->Assign(fForm2Array[iActForm2]->bPicArray[fForm2Array[iActForm2]->iPicNow]);
                fForm2Array[iActForm2]->SetForm3List();
        }
}
void __fastcall TForm1::N9Click(TObject *Sender)
{
        Form7=new TForm7(this);
        Form7->ShowModal();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N5Click(TObject *Sender)
{
        Form1->Close();        
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N20Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        Form8=new TForm8(this);
        Form8->ShowModal();
        if(iReturnValue)
                fForm2Array[iActForm2]->f_imageSmoothProcess(1);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N22Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        iTNum=3;
        iTemplate[0][0]=0;
        iTemplate[0][1]=1;
        iTemplate[0][2]=0;
        iTemplate[1][0]=1;
        iTemplate[1][1]=-4;
        iTemplate[1][2]=1;
        iTemplate[2][0]=0;
        iTemplate[2][1]=1;
        iTemplate[2][2]=0;
        fForm2Array[iActForm2]->f_imageSmoothProcess(2);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N24Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        Form9=new TForm9(this);
        Form9->ShowModal();
        if(iReturnValue)
                fForm2Array[iActForm2]->f_imageSharpProcess(1);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N25Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        Form10=new TForm10(this);
        Form10->ShowModal();
        if(iReturnValue)
                fForm2Array[iActForm2]->f_imageSmoothProcess(3);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N27Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(1);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N28Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(2);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N29Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(3);        
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N30Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(4);        
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N33Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(5);        
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N32Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(6);
}
//---------------------------------------------------------------------------


void __fastcall TForm1::N34Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageColorProcess(7);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N36Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageSharpProcess(2);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N37Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        Form11=new TForm11(this);
        Form11->ShowModal();
        if(iReturnValue)
                fForm2Array[iActForm2]->f_imageEmbossProcess();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N40Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        Form12=new TForm12(this);
        Form12->ShowModal();
        if(iReturnValue)
                fForm2Array[iActForm2]->f_imageSpreadProcess();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N43Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageBinaryProcess();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::FormResize(TObject *Sender)
{
        if((Panel2->Width>=Panel1->Width-110)&&Panel3->Visible==false&&Panel4->Visible==false )
                Panel2->Left=120;
        else if((Panel2->Width>=Panel1->Width-110)&&Panel3->Visible==true)
                Panel2->Left=124+Panel3->Width;
        else if((Panel2->Width>=Panel1->Width-110)&&Panel4->Visible==true)
                Panel2->Left=124+Panel4->Width;
        else
                Panel2->Left=Panel1->Width - 334;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Shape1MouseUp(TObject *Sender, TMouseButton Button,
      TShiftState Shift, int X, int Y)
{
        if (ColorDialog1->Execute())
        {
                tGraphColor=ColorDialog1->Color;
                Shape1->Brush->Color=tGraphColor;
        }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Shape2MouseUp(TObject *Sender, TMouseButton Button,
      TShiftState Shift, int X, int Y)
{
        if (ColorDialog1->Execute())
        {
                tBrushColor=ColorDialog1->Color;
                Shape2->Brush->Color=tBrushColor;
        }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::CheckBox1Click(TObject *Sender)
{
        if(CheckBox1->Checked)
        {
                bIsTransparence=true;
                Form3->SpeedButton5->Glyph->LoadFromResourceName((int)HInstance,"AB_RNULL");
                Form3->SpeedButton3->Glyph->LoadFromResourceName((int)HInstance,"AB_ENULL");
        }
        else
        {
                Form3->SpeedButton5->Glyph->LoadFromResourceName((int)HInstance,"AB_RBRUSH");
                Form3->SpeedButton3->Glyph->LoadFromResourceName((int)HInstance,"AB_EBRUSH");
                bIsTransparence=false;
        }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Edit1Change(TObject *Sender)
{
        iGraphThick=StrToInt(Edit1->Text);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::About1Click(TObject *Sender)
{
        Form14=new TForm14(this);
        Form14->ShowModal();
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N1801Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageRotateProcess(1);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N56Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageRotateProcess(2);        
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N57Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageRotateProcess(3);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Shape3MouseUp(TObject *Sender, TMouseButton Button,
      TShiftState Shift, int X, int Y)
{
        if (ColorDialog1->Execute())
        {
                tGroundColor=ColorDialog1->Color;
                Shape3->Brush->Color=tGroundColor;
        }
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N52Click(TObject *Sender)
{
        if(bForm2Null[iActForm2])
                return;
        fForm2Array[iActForm2]->f_imageClear(1);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N50Click(TObject *Sender)
{
        if(bForm2Null[iActForm2]||iGraphStyle!=1)
                return;
        fForm2Array[iActForm2]->f_imageClear(0);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::N2Click(TObject *Sender)
{
        int i;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -