home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2003 November
/
PCWK1103B.iso
/
PCWK-txt
/
Warsztat_Cpp_Builder
/
UnitJasnosc.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2003-09-21
|
2KB
|
54 lines
//---------------------------------------------------------------------------
#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;
}
//---------------------------------------------------------------------------