8–Mashg’ulot. Paskalning grafik imkoniyati. Tasvirli matnlar bilan ishlash. Maqsad: Paskal tilida Paskalning grafik imkoniyatini, Tasvirli matnlar bilan ishlashni yozilishi va ularning qo’llanishini o’rganish


Fillellipse (x,y, Xradius,Vradius)


Download 39.62 Kb.
Pdf ko'rish
bet5/6
Sana03.02.2023
Hajmi39.62 Kb.
#1150164
1   2   3   4   5   6
Bog'liq
Laboratoriya ishi № 19-20

Fillellipse (x,y, Xradius,Vradius) – ranglangan ellipsni chizadi. Xradius –
ellipsning eni, Yradius esa balandligidir.
Fillpoly(Numpointes,PolyPointes) – rangli ko’pburchakni chizadi,
NumPointes – ko’pburchak uchlarining soni. PolyPointes – ko’pburchak uchlari
koordinatalari berilgan massiv.
Grafik adapterlarning turiga mos ravishda kompyuter ekranida hosil bo’luvchi
ranglar soni har xil bo’lishi mumkin. Shu sababli ranglarning umumiy soni uchun
Getmaxcolor o’zgarmasi kiritilgan.
Misol – 6. M(50,50) yuqori chap va N(200,200) pastkti o’ng burchaklari berilgan,
qizil rang bilan bo’yalgan to’rt burchakni chizish dasturi:
uses Graph;
var
Gd, Gm: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
SetFillStyle(11,12);
Bar(50, 50, 200, 200);
readln;
CloseGraph;
end.
Misol – 7. Rangli, chuqurligi 30ga teng va M(50,50) yuqori chap va N(200,200)
pastkti o’ng burchaklari berilgan parallelepiped chizish dasturi:
uses Graph;
var
Gd, Gm: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
SetFillStyle(11,15);
Bar3d(50, 50, 200, 200,30, topon);
readln;
CloseGraph;
end.
M(x,y)
xr
yr


60
Misol – 8 . Markazi M(200,200) bo’lgan, x koordinatasi bo’yicha 60 va y
koordinatasi bo’yicha 20 riadusli ellips chizish dasturi:
uses Graph;
var
Gd, Gm: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
SetFillStyle(11,7);
fillellipse(200, 200, 60,20);
readln;
CloseGraph;
end.
Misol – 9 . rangli, 3 qirrali va uchlar koordinatalari A(X:150; Y:100), B(X:100;
Y:100), C(X: 150; Y: 150)) bo’lgan ko’pburchakni chiziqni dasturi:
uses Graph;
const
Triangle: array[1..4] of PointType = ((X:
150; Y: 100),(X: 100; Y:100),(X:150; Y: 150),
(X: 150; Y: 100));
var Gd, Gm: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);

Download 39.62 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling