//--------------------------------------------------------------------------- #include #pragma hdrstop #include "Kasuri_sub.h" #include "LogData.h" //--------------------------------------------------------------------------- #define IDS_Caption StringTable[0] #define IDS_Preview StringTable[1] #define IDS_CRAYON StringTable[2] #define IDS_DENSITY StringTable[3] #define IDS_APPLYPEN StringTable[4] #define IDS_OK StringTable[5] #define IDS_CANCEL StringTable[6] //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "RzButton" #pragma link "RzEdit" #pragma link "RzPanel" #pragma link "RzRadChk" #pragma link "RzSpnEdt" #pragma link "TPStretchImage" #pragma link "RzTrkBar" #pragma resource "*.dfm" TKasuriSubForm *KasuriSubForm; //--------------------------------------------------------------------------- __fastcall TKasuriSubForm::TKasuriSubForm(TComponent* Owner) : TForm(Owner) { BEGIN_LOG(""); SetSmallFont(Font); StringTable.Create(DirectoryItem, Language, "Kasuri_sub"); Caption = IDS_Caption; gbCrayon->Caption = IDS_Preview; rzcbCrayon->Caption = IDS_CRAYON; lbDensity->Caption = IDS_DENSITY; rzbtApplyPen->Caption = IDS_APPLYPEN; rzbtOK->Caption = IDS_OK; rzbtCancel->Caption = IDS_CANCEL; END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::penImageMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { BEGIN_LOG(""); KasuriForm->penImageMouseDown(Sender,Button,Shift,X,Y); GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::penImageMouseMove(TObject *Sender, TShiftState Shift, int X, int Y) { BEGIN_LOG(""); KasuriForm->penImageMouseMove(Sender,Shift,X,Y); GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::penImageMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { BEGIN_LOG(""); KasuriForm->penImageMouseUp(Sender,Button,Shift,X,Y); GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::rzcbCrayonClick(TObject *Sender) { BEGIN_LOG(""); KasuriForm->rzcbCrayon->Checked = rzcbCrayon->Checked; GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::rzseDensityChange(TObject *Sender) { BEGIN_LOG(""); KasuriForm->rzseDensity->Value = rzseDensity->Value; GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::rzseDensityMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { // } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::rzbtApplyPenClick(TObject *Sender) { BEGIN_LOG(""); KasuriForm->rzbtApplyPenClick(NULL); GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::rzbtOKClick(TObject *Sender) { BEGIN_LOG(""); KasuriForm->rzbtOKClick(NULL); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::rzbtCancelClick(TObject *Sender) { BEGIN_LOG(""); KasuriForm->rzbtCancelClick(NULL); END_LOG; } //--------------------------------------------------------------------------- inline void __fastcall TKasuriSubForm::GetImage() { BEGIN_LOG(""); penImage->Bitmap->Create(penImage->Width, penImage->Height, 24); penImage->Bitmap->Copy(KasuriForm->penImage->Bitmap, SRCCOPY); KasuriSubForm->penImage->Repaint(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::FormPaint(TObject *Sender) { BEGIN_LOG(""); GetImage(); END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::EditorSelectAll(TObject *Sender) { SetFocusAndSelectAll(Sender); } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::tbrCrayonChange(TObject *Sender) { // BEGIN_LOG(""); // // KasuriForm->tbrCrayon->Position = tbrCrayon->Position; // GetImage(); // // END_LOG; } //--------------------------------------------------------------------------- void __fastcall TKasuriSubForm::tbrCrayonMouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y) { BEGIN_LOG(""); KasuriForm->tbrCrayon->Position = tbrCrayon->Position; GetImage(); END_LOG; } //---------------------------------------------------------------------------