void __fastcall TForm1::RojoChange(TObject *Sender)
{
Panel1->Color = (TColor)RGB(Rojo->Position, Verde->Position, Azul->Position);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
for(int i = 0; i < 1000; i++)
{
Image1->Canvas->Pixels[random(Image1->Width)][random(Image1->Height)]
= (TColor)RGB(random(180)+175, 0, 0);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn2Click(TObject *Sender)
{
for(int i = 0; i < 1000; i++)
{
Image1->Canvas->Pixels[random(Image1->Width)][random(Image1->Height)]
= (TColor)RGB(0, random(180)+175, 0);
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{
for(int i = 0; i < 1000; i++)
{
Image1->Canvas->Pixels[random(Image1->Width)][random(Image1->Height)]
= (TColor)RGB(0, 0, random(180)+175);
}
}
//---------------------------------------------------------------------------
Este programa que hicismos en clase es mas facil de lo que parece. Espero y les guste.
No hay comentarios:
Publicar un comentario