home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
-
- #include <vcl.h>
- #pragma hdrstop
-
- #include "UnitJasnosc.h"
- #include "fotoretusz.h"
- //---------------------------------------------------------------------------
- #pragma package(smart_init)
- #pragma resource "*.dfm"
- TFormJasnosc *FormJasnosc;
-
- //---------------------------------------------------------------------------
- __fastcall TFormJasnosc::TFormJasnosc(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
-
- void __fastcall TFormJasnosc::tbJasnoscChange(TObject *Sender)
- {
- edJasnosc->Text = IntToStr( tbJasnosc->Position );
-
- TMemoryStream *pms = new TMemoryStream;
- pms->Position = 0;
- rys1->Picture->Bitmap->SaveToStream( pms );
- pms->Position = 0;
- rys2->Picture->Bitmap->LoadFromStream( pms );
- delete pms;
-
- DostosujJasnosc( rys2->Picture->Bitmap,tbJasnosc->Position*2.55 );
- }
- //---------------------------------------------------------------------------
-
- void __fastcall TFormJasnosc::edJasnoscChange(TObject *Sender)
- {
- int v;
- if( TryStrToInt( edJasnosc->Text,v ) )
- tbJasnosc->Position = v;
- }
- //---------------------------------------------------------------------------
- void __fastcall TFormJasnosc::FormShow(TObject *Sender)
- {
- tbJasnosc->Position = 0;
- edJasnosc->Text = "0";
- TMemoryStream *pms = new TMemoryStream;
- pms->Position = 0;
- rys1->Picture->Bitmap->SaveToStream( pms );
- pms->Position = 0;
- rys2->Picture->Bitmap->LoadFromStream( pms );
- delete pms;
- }
- //---------------------------------------------------------------------------
-