home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2003 November
/
PCWK1103B.iso
/
PCWK-txt
/
Warsztat_Cpp_Builder
/
UnitGamma.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2003-09-21
|
1KB
|
40 lines
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "UnitGamma.h"
#include "Fotoretusz.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormGamma *FormGamma;
//---------------------------------------------------------------------------
__fastcall TFormGamma::TFormGamma(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormGamma::tbGammaChange(TObject *Sender)
{
edGamma->Text = FloatToStr( 1+tbGamma->Position/100.0 );
TMemoryStream *pms = new TMemoryStream;
pms->Position = 0;
rys1->Picture->Bitmap->SaveToStream( pms );
pms->Position = 0;
rys2->Picture->Bitmap->LoadFromStream( pms );
delete pms;
DostosujGamma( rys2->Picture->Bitmap,1+tbGamma->Position/100.0 );
}
//---------------------------------------------------------------------------
void __fastcall TFormGamma::edGammaChange(TObject *Sender)
{
double v;
if( TryStrToFloat(edGamma->Text,v) )
tbGamma->Position = (int) (v-1)*100;
}
//---------------------------------------------------------------------------