fillPoly(4, Triangle);
Readln;
CloseGraph;
end.
GRAFIK REJIMIDA MATNLAR HOSIL QILISH.
SetTextstyle(Font,Direction,Size) – joriy shriftning o’lchami va yo’nalishini
belgilaydi. Font –
shrift turini, Direction — matnni chiqarilish yo’nalishi (chapdan
o’ngga yoki pastdan yuqoriga). Size — shrift o’lchamini belgilaydi.
SetTextJustify(horiz,vert) – matnni vertikal va gorizontal chiziq bo’yicha
tekislash vazifasini bajaradi.
OutTextXY(X,Y,Textstring) – Textstring matnni X,
Y koordinatali nuqtadan
boshlab yozadi.
Misol– 10. ‘END.’ Matnini M(50,200) nuqtada 12 o’lchamli qilib yozuvchi dastur:
uses Graph;
var
Gd, Gm: Integer;
Y, Size: Integer;
61
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
begin
SetTextStyle(DefaultFont, HorizDir, 12);
OutTextXY(50, 200,'E N D.' );
end;
Readln;
CloseGraph;
end.
Misol – 6 . 'T U R B O Paskal' matnini M(200,250) nuqtada yozish dasturi:
uses Graph;
var Gd, Gm: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
OutTextXY( 200,250,'T U R B O Paskal');
Readln;
CloseGraph;
end.
Topshiriqlar:
1. Qizil rangli matn yozish dasturini tuzing.
2. Ekranning (100;100) nuqtasiga ‘O’ZBEKISTON’ yozish dasturini tuzing.
3. Kursorni 100 millisekund to’xtatib turuvchi dastur tuzing.
4. Ekranda matn yozish uchun oyna hosil qilish dasturini tuzing.
5. a(10;20) nuqtadan b(100,200) nuqtagacha kesma hosil qilish dasturini tuzing.
6. M(100;200) markazli 10 raidusli aylana chizish dasturini tuzing.
7. a(10;10) yuqori chap va b(100,500) pastki o’ng uchlarga ega to’rtburchakni
hosil qilish dasturini tuzing.
8. M(50;60)
markazli, raidusi 60 va burchakning boshlang’ish qiymati 23, oxirgi
qiymati 56 bo’lgan yoy hosil qilish dasturini tuzing.
9. 5 burchakli ko’pburchak hosil qilish dasturini tuzing.
10. Rangli 5 burchakli ko’pburchak hosil qilish dasturini tuzing.
11. M(200;200) markazli, x raidusi 20 va raidusi 60 bo’lgan
ellips hosil qilish
dasturini tuzing.
12. Yashil rangli matn yozish dasturini tuzing.
13.Ekranning (200;100) nuqtasiga ‘O’ZBEKISTON’ yozish dasturini tuzing.
14.Kursorni 500 millisekund to’xtatib turuvchi dastur tuzing.
15.a(20;25) nuqtadan b(112,240) nuqtagacha kesma hosil qilish dasturini tuzing.