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

📄 unit18.cpp

📁 05年毕业设计(BC)-图像处理软件及完整源代码
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit18.h"
#include "Unit1.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
extern TColor tGraphColor;          //图形颜色
extern TColor tBrushColor;         //填充颜色
extern TColor tGroundColor;       //背景色
TColor tForm18TempColor;
TForm18 *Form18;
//---------------------------------------------------------------------------
__fastcall TForm18::TForm18(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TForm18::BitBtn2Click(TObject *Sender)
{
        this->Close();
}
//---------------------------------------------------------------------------

void __fastcall TForm18::FormShow(TObject *Sender)
{
        tForm18TempColor=Form3->Shape1->Brush->Color;
        Edit1->Text=IntToStr(GetRValue(tForm18TempColor));
        Edit2->Text=IntToStr(GetGValue(tForm18TempColor));
        Edit3->Text=IntToStr(GetBValue(tForm18TempColor));
        Shape1->Brush->Color=tForm18TempColor;
}
//---------------------------------------------------------------------------

void __fastcall TForm18::BitBtn1Click(TObject *Sender)
{
        tForm18TempColor=Shape1->Brush->Color;
        if(CheckBox1->Checked)
        {
                tGraphColor=tForm18TempColor;
                Form1->Shape1->Brush->Color=tForm18TempColor;
        }
        if(CheckBox2->Checked)
        {
                tBrushColor=tForm18TempColor;
                Form1->Shape2->Brush->Color=tForm18TempColor;
        }
        if(CheckBox3->Checked)
        {
                tGroundColor=tForm18TempColor;
                Form1->Shape3->Brush->Color=tForm18TempColor;
        }
        Form3->Shape1->Brush->Color=tForm18TempColor;
        Form1->StatusBar2->Panels->Items[1]->Text="RGB: ("+IntToStr(GetRValue(tForm18TempColor))+","+IntToStr(GetGValue(tForm18TempColor))+","+IntToStr(GetBValue(tForm18TempColor))+")";
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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