linkedin facebook linkedin facebook nod32

PascalABC cho`tka bilan ishlash

Muallif: Faxriddinov Sh.

Qo`shilgan sana: 2015-01-21

PascalABC cho`tka bilan ishlash

Bu qismda siz cho’tka bilan ishlash mahoratingizni oshirasiz degan umiddamiz .Bundan tashqari qo’shimcha vazifalar Orqali bilim salohiyatingiz oshadi                    

         

5.1 SetBrushColor(color: integer)
program grafik5_1;
// SetBrushColor(color: integer)
//berilgan rangni cho'tka rangi sifatida o'rnatadi
//Quyidagi dastur ekranga ichi ko'k yashil va qizil bo'yalgan
//3 ta to'rtburchak chizadi
uses graphAbc;
begin
setwindowsize(300,200);
setbrushcolor($ff0000);
rectangle(50,50,100,100);
setbrushcolor($00ff00);
rectangle(125,50,175,100);
setbrushcolor($0000ff);
rectangle(200,50,275,100);
end.

         

5.2 BrushColor: integer
  program grafik5_2;
//  BrushColor: integer
//cho'tka joriy rangini qaytaradi.Ekranga tasodifiy tanlangan
//3 ta to'rtburchak va bu ranglar tartib raqamini chiqaradi
uses graphAbc;
begin
setwindowsize(700,200);
setbrushcolor(random($ffffff));
rectangle(100,50,200,100);
textout(120,150,'Rang '+inttostr(brushcolor));
setbrushcolor(random($ffffff));
rectangle(300,50,400,100);
textout(320,150,'Rang '+inttostr(brushcolor));
setbrushcolor(random($ffffff));
rectangle(500,50,600,100);
textout(520,150,'Rang '+inttostr(brushcolor));
end.

         

5.3 SetBrushPicture(name: string)
program grafik5_3;
//  SetBrushPicture(name: string)
// name nomli matn o'zgaruvchisi yoki matn o'zgarmasida berilgan faylda saqlangan
//rasmni cho'tka uchun namuna sifatida yuklaydi.Cho'tka rangi va stili
//inobatga olinmaydi
uses graphAbc;
begin
setwindowsize(600,200);
//Bunda qavs ichida rasm fayli bilan kiritiladi
setbrushpicture('d:\Gif\1.jpg');
rectangle(50,50,100,100);
setbrushpicture('d:\Gif\5.jpg');
rectangle(200,50,300,100);
setbrushpicture('d:\Gif\3.jpg');
rectangle(400,50,500,100);
end.

         

5.4 ClearBrushPicture;
program grafik5_4;
// ClearBrushPicture;
//yuqorida yuklangan rasmni bekor qilish.Avvalgi rang va stilni ham
//bekor qilish uchun ishlatiladigan protsedura
uses graphAbc;
begin
setwindowsize(850,200);
//Birinchi rasm
setbrushcolor($ff0000);
setbrushpicture('d:\Gif\1.jpg');
rectangle(50,30,200,170);
//Ikkinchi rasm bekor qilinmoqda
clearbrushpicture;
rectangle(250,30,400,170);
//Uchinchi rasm
setbrushpicture('d:\Gif\7.jpg');
rectangle(450,30,600,170);
setbrushcolor($ff0000);
//To'rtinchi rasm
setbrushcolor($ff0000);
rectangle(650,30,800,170);
setbrushpicture('d:\Gif\4.jpg');
end.

         

5.5 SetBrushStyle(bs: integer);
 Program grafik5_6;
//  SetBrushStyle(bs: integer);
//Cho'tkaga stil tanlash uchun bs parametrdan foylalanish protsedurasi
//bs ga quyidagilar mavjud
//bsSolid-cho'tka uchun tanlangan normal
//bsCross-kesishuvchi chiziqlar
//bsClear-fon uchun tanlangan normal
//bsDiagCross-diagonal bilan kesishgan
//bsHorizontal-gorizontal chiziqlar
//bsDiagonal-to'g'ri dioganal chiziqlar
//bsVertical-vertikal chiziqlar
//bsFDiagonal-teskari dioganal chiziqlar
uses graphabc;
var i:integer;
begin setwindowsize(800,200);
setpencolor($ff0000); setbrushcolor($ff0000);
for i:=2 to 7 do begin
setbrushstyle(i); rectangle(-200+i*100,50,-100+i*100,150);
end
end.

         

5.6 BrushStyle: integer;
program grafik5_6;
// BrushStyle: integer;
//Cho'trka stili tartib raqamini qaytaradi
uses graphabc;
var i:integer;
begin
setwindowsize(600,200);
setfontsize(25);
setfontcolor($ff0000);
textout(100,2,'@@@Still nomerlari@@@');
setbrushcolor($0000ff);
for i:=2 to 7 do
begin
setbrushstyle(i);
circle(-150+i*100,150,50);
textout(-160+i*100,50,inttostr(brushstyle));
end
end.

836 marta o`qildi.

Parol:
Eslab qolish.


Ro`yhatdan o`tish

testing

+998915878681

Siz o`z maxsulotingizni 3D reklama ko`rinishda bo`lishini xohlaysizmi? Unda xamkorlik qilamiz.

3D Reklama


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений