Canvas->Pen->Color = clBlue;
Canvas->Brush->Color = clBlue;
Canvas->Ellipse(105,55,195,145);
//yulduz chizish
Canvas->Font->Name = "Monotype Corsiva";
Canvas->Font->Color = clWhite;
Canvas->Font->Size = 28;
Canvas->TextOut(180,60," ***");
Canvas->TextOut(180,85,"****");
Canvas->TextOut(180,110,"*****");
Canvas->Pen->Color = clRed;
Canvas->Brush->Color = clRed;
Canvas->Rectangle(70,150,600,160);
Canvas->Pen->Color = clWhite;
Canvas->Brush->Color = clWhite;
Canvas->Rectangle(70,160,600,260);
Canvas->Pen->Color = clRed;
Canvas->Brush->Color = clRed;
Canvas->Rectangle(70,260,600,270);
Canvas->Pen->Color = clGreen;
Canvas->Brush->Color = clGreen;
Canvas->Rectangle(70,270,600,370);
}
//-------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
Form1->Close(); }
Natijada quyidagi tasvirni olamiz :
Dastur bajarilishi natijasida olingan tasvir
Sinоv sаvоllаri:
Borland С++ da tasvirlar bilan ishlash uchun qanday sinflardan foydalaniladi?
C++ tili qanday grafik imkoniyatlarga ega?
Ekranda chizmalarni hosil qilish uchun qanday metodlarni bilasiz?
Qanday bo‘yash turlari mavjud?
Tajriba ishini bajarish uchun topshiriq variantlari:
1. Borland С++ ning Canvas xossasining usullaridan foydalanib ixtiyoriy grafik tasvir yarating.
2. Image komponentasidan foydalanib formaga rasmlarni o‘rnating va uning xossalarini o‘zgartiring.
Do'stlaringiz bilan baham: |