linkedin facebook linkedin facebook nod32

PASKALABC DA MATN VA SHRIFT USTIDA AMALLAR

Muallif: Faxriddinov Sh.

Qo`shilgan sana: 2015-01-21

PASKALABC DA MATN VA SHRIFT USTIDA AMALLAR

Bu qismda siz matnlar va shriftlarga oid bilimlaringizni yanada oshirasiz degan umiddaman

2.1 TextOut(x,y: integer; s: string);
program grafik2_1;
//Tuzuvchi:FAXRIDDINOV SHERZOD
//Maqsad: Biz kiritgan matn satrini (x,y) da boshlab chiqaradi.Bu nuqta
//matn satri joylashadigan to'rtburchak chap yuqori nuqtasiga mos keladi
// TextOut(x,y: integer; s: string);
uses graphABC;
begin
Textout(35,35,'Bu matn (35, 35) nuqtada:')
end.

2.2 SetFontColor(color: integer)
program grafik2_2;
//Maqsad: Ekranga chiqariladigan matn rangini tanlash
// SetFontColor(color: integer)
uses graphABC;
begin
SetFontColor($ff0000);
textout(25,15,'Matn rangi ko''k.');
SetFontColor($00ff00);
textout(25,30,'Matn rangi yashil.');
SetFontColor($0000ff);
textout(25,45,'Matn rangi qizil.');
SetFontColor($000000);
textout(25,60,'Matn rangi qora.');
end.

2.3 SetFontName(name: string)
program grafik2_3;
//Maqsad: Ekranga joriy shriftli matn chiqarish
// SetFontName(name: string)
uses graphABC;
begin
SetFontName('Ozbekiston kelajagi buyuk davlat:');
textout(20,20,'Ozbekiston kelajagi buyuk davlat:');
SetFontName('Termiz davlat universiteti');
textout(20,40,'Termiz davlat universiteti');
end.

2.4 SetFontStyle(fs: integer);
program grafik2_4;
//Maqsad: Matn stilini tanlash
//  SetFontStyle(fs: integer);
uses graphABC;
begin
//fsNormal=0 –oddiy
SetFontstyle(fsNormal);
textout(20,20,'@ Oddiy matn @');
//fsBold =1 –qalin
SetFontstyle(fsBold);
textout(20,40,'@ Qalin matn @');
//fsItalic=2 –qiya
SetFontstyle(fsItalic); textout(20,60,'@ Qiya matn @');
//fsBoldItalic=3 –qalin va qiya
SetFontstyle(fsBoldItalic);
textout(20,80,'@ Qalin va qiya matn @');
//fsUnderline =4 –ostiga chizilgan
SetFontstyle(fsUnderline);
textout(20,100,'@ Ostiga chizilgan matn @');
//fsBoldUnderline=5 –qalin va ostiga chizilgan
SetFontstyle(fsBoldUnderline);
textout(20,120,'@ Qalin va ostiga chizilgan matn @');
//fsItalicUnderline=6 –qiya va ostiga chizilgan
SetFontstyle(fsItalicUnderline);
textout(20,140,'@ Qiya va ostiga chizilgan matn @');
//fsBoldItalicUnderline=7 –qalin,qiya va ostiga chizilgan
SetFontstyle(fsBoldItalicUnderline);
textout(20,160,'@ Qalin, qiya va ostiga chizilgan matn @');
end.

2.5 SetFontSize(sz: integer);
program grafik2_5;
//Maqsad:Matn shrifti o'lchamini belgilash
// SetFontSize(sz: integer);
uses graphABC;
begin
SetFontName('Grafik dastur:');
setfontsize(10);
textout(10,20,'10 o''lchamli matn');
setfontsize(15);
textout(10,40,'15 o''lchamli matn');
setfontsize(20);
textout(10,80,'20 o''lchamli matn');
setfontsize(40);
textout(10,160,'40 o''lchamli matn');
end.

2.6 FontColor: integer;
program grafik2_6;
//Maqsad: Shrift rangini tanlash
// FontColor: integer;
uses graphABC;
begin
SetFontColor($ff0000);
textout(20,20,'Kok rangli matn:');
SetFontColor($ffffff-fontcolor);
textout(20,40,'Sariq rangli matn:');
SetFontColor($00ff00);
textout(20,60,'Yashil rangli matn:');
SetFontColor($ffffff-fontcolor);
textout(20,80,'Binafsha rangli matn:');
SetFontColor($0000ff);
textout(20,100,'Qizil rangli matn:');
SetFontColor($ffffff-fontcolor);
textout(20,120,'Och moviy rang:');
SetFontColor($000000);
textout(20,140,'Qora rangli matn:');
end.

2.7 FontSize: integer;
program grafik2_7;
//Maqsad: Shrift o'lchamini butun son sifatida qaytaradi
// FontSize: integer;
uses graphABC;
begin
SetFontName('Informatika va AT');
setfontsize(random(10)+15);
textout(20,20,'matn o''lchami '+inttostr(fontsize));
setfontsize(fontsize*2);
textout(20,25,'matn o''lchami '+inttostr());
end.

2.8  FontName: string
program grafik2_8;
//Maqsad: Joriy shrift nomini qaytaradi.
// FontName: string
//Dastlab joriy shrift sifatida Ms Sans Serif shrifti o'rnatilgan bo'ladi.
//Times,Arial,Courier New keng tarqalgan shrift nomlari.Bunda shrift nomlaridagi
//katta va kichik harflar farqlanmaydi
//Maqsad: Shrift joriy stilini qaytaradi
// FontStyle: integer;
uses graphABC;
begin
SetFontstyle(fsNormal);
textout(15,15,inttostr(fontstyle));
SetFontstyle(fsBold);
textout(15,30,inttostr(fontstyle));
SetFontstyle(fsItalic); textout(20,60,inttostr(fontstyle));
SetFontstyle(fsBoldItalic);
textout(15,45,inttostr(fontstyle));
SetFontstyle(fsUnderline);
textout(15,60,inttostr(fontstyle));
SetFontstyle(fsBoldUnderline);
textout(15,75,inttostr(fontstyle));
SetFontstyle(fsItalicUnderline);
textout(15,90,inttostr(fontstyle));
SetFontstyle(fsBoldItalicUnderline);
textout(15,105,inttostr(fontstyle));
end.

2.9 TextWidth(s: string): integer
program grafik2_10;
//Maqsad: Joriy shrift o'lchamlarida berilgan matn piksellarda qanday balandlikka
//ega bo'lishini aniqlab qaytaradi
// TextWidth(s: string): integer
uses graphABC;
var s: string;
begin
s:='Darcha kengligi matn olchamiga moslangan.';
setfontsize(35);
textout(25,25,Hello world);
Setwindowwidth(20+textwidth(s))  

end.

2.10 TextHeight(s: string): integer;
program grafik2_11;
//Maqsad:Matn qanday uzunlikka ega bo'lishini aniqllab qaytaradi
//TextHeight(s: string): integer;
uses graphABC;
var s: string;
begin
s:='Darcha o''lchami matnga moslangan.';
setfontsize(35);
textout(15,15,Hello world);
SetwindowSize(20+textwidth(Hello world),20+textheight(Hello world))
end.

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