Line(X1,Y1,X2,Y2) operatori ekranning (X1,Y1) koordinatali nuqtasi bilan (X2,Y2) koordinatali nuqtasini birlashtiruvchi joriy rangli kesma chizadi.
Circle(X,Y,R) operatori markazi (X,Y) nuqtada va radiusi R ga teng aylana chizadi. Endi aylanalar bilan bog’liq masalalarni osongina hal etish mumkin.
1 –misol. Uchlarining koordinatalari (10,200) va (630,200) bo‘lgan ko‘k rangli kesma va markazi (300,200) koordinatali nuqtada va radiusi 100 bo‘lgan yashil rangli chizing. Fon sariq rangda bo‘lsin.
Uses Graph;
Var gd, gm : Integer;
Begin Gd:=Detect; InitGraph(gd, gm,‘‘);
SetBkColor(Yellow); Setcolor(Blue); Line(10,10,630,470); Setcolor(Green); Circle(300,200,100);
Readln; CloseGraph;
End.
Do'stlaringiz bilan baham: |