linkedin facebook linkedin facebook nod32

PaskalABC da rang o’zgarmaslari va rang bilan ishlash uchun funksiyalar

Muallif: Faxriddinov Sh.

Qo`shilgan sana: 2015-01-21

PaskalABC da rang o’zgarmaslari va rang bilan ishlash uchun funksiyalar

         

6.1 RGB(r,g,b: integer): ColorType;
program grafik6_1;
//6-bob.RANGLAR BILAN ISHLASH
//  RGB(r,g,b: integer): ColorType;
//Asosiy ranglar(qizil,yashil,ko'k) ning tashkil etuvchilari r,g,b nomerlarini
//qaytaradi.r,g,b 0-255 oralig'idagi tasodifiy sonlar
uses graphAbc;
begin
setwindowsize(700,200);
//Asosiy rang tashkil etuvchisi
setbrushcolor(rgb($ff,00,00));
rectangle(100,50,200,150);
setbrushcolor(rgb(00,$ff,00));
rectangle(300,50,400,150);
setbrushcolor(rgb(00,00,$ff));
rectangle(500,50,600,150);
end.

         

6.2 GetRed(color: ColorType): integer;
program grafik6_2;
// GetRed(color: ColorType): integer;
//Berilgan rangdan uning qizil rangini ajratib oladi
uses graphAbc;
begin
setwindowsize(400,200);
setbrushcolor(rgb($ff,00,00));
rectangle(50,50,250,150);
 GetRed((rgb($ff,00,00)));
 end.

         

6.3 GetRed(color: ColorType): integer;
program grafik6_2;
// GetRed(color: ColorType): integer;
//Berilgan rangdan uning qizil rangini ajratib oladi
uses graphAbc;
begin
setwindowsize(400,200);
setbrushcolor(rgb($ff,00,00));
rectangle(50,50,250,150);
 GetRed((rgb($ff,00,00)));
 end.

         

6.4 GetGreen(color: ColorType): integer;
program grafik6_3;
// GetGreen(color: ColorType): integer;
//Berilgan rangdan uning yashil rangini ajratib oladi
uses graphAbc;
begin
//qizil-$ff,00,00
//yashil-00,$ff,00
//ko'k- 00,00,$ff
setwindowsize(400,200);
setbrushcolor(rgb(00,$ff,00));
rectangle(50,50,250,150);
 GetGreen((rgb(00,$ff,00)));
 end.

         

6.5 GetBlue(color: ColorType): integer;
program grafik6_4;
// GetBlue(color: ColorType): integer;
//Berilgan rangdan uning ko'k rangini ajratib oladi
uses graphAbc;
begin
//qizil-$ff,00,00
//yashil-00,$ff,00
//ko'k- 00,00,$ff
setwindowsize(400,200);
setbrushcolor(rgb(00,00,$ff));
rectangle(50,50,250,150);
 GetGreen((rgb(00,00,$ff)));
 end.

         

6.6 GetBlue(color: ColorType): integer
  program grafik6_5;
// GetBlue(color: ColorType): integer;
uses graphAbc;
var clr: integer;
begin
setfontsize(20);
clr:=clrandom;
textout(50,170,inttostr((clr)));
textout(300,170,inttostr(getred(clr)));
textout(500,170,inttostr(getgreen(clr)));
textout(700,170,inttostr(getblue(clr)));
setwindowsize(850,220);
setbrushcolor(clr);
rectangle(50,50,200,150);
setbrushcolor(rgb(getred(clr),00,00));
rectangle(250,50,400,150);
setbrushcolor(rgb(00,getgreen(clr),00));
rectangle(450,50,600,150);
setbrushcolor(rgb(00,00,getblue(clr)));
rectangle(650,50,800,150);
end.

789 marta o`qildi.

Foydalanuvchi ismi: abbos
Qo`shilgan sana: 2015-06-24

yaxshi

Foydalanuvchi ismi: abbos
Qo`shilgan sana: 2015-06-24

yaxshi

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
счетчик посещений