SetColor(rang)
|
Ciziq rangini tanlash uchun
|
SetBkColor(rang)
|
Fon rangini tanlash uchun
|
Yangi mavzu bayoni “Kredit bo’limi”
Misol. Kordinatalari (10, 200) va (630, 200) bo’lgan ko’k rangli kesma hamda (300, 200)kordinatali va radiusi 100 bo’lgan yashil rangli aylana chizish,foni sariq rangdagi sakil chizish dasturi.
Ekrandagi natija
Line(X1,Y1,X2,Y2)
|
(X1,Y1) va (X2,Y2)
nuqtalarni tutashtiruvchi kesma chizadi.
|
Circle(X,Y,R)
|
Markazi (X,Y)
nuqtada yotuvchi, Radiusi R ga teng bo’lgan aylana chizadi
|
Uses Graph;
Var Gd,Gm: Integer;
Begin Gd:= Detect; initGraph(gd, gm,’’);
SetBkColor(yellow);
SetColor(Blue); Line(10,10, 630,200); SetColor(Green); Circle(300, 200, 100);
Readln; CloseGraph;
End.
Misol. Markazi (300, 200) koordinatali, X o’qi bo’yicha radiusi 100, Y o’qi bo’yicha Radiusi 50, boshlang’ich burchagi 00, oxirgi burchagi 1350 bo’lgan qizil rangli yoy va (10,220) va (300, 400) koordinatali nuqtada bo’lgan ko’k rangli to’g’ri to’rtburchak chizing.
Ekrandagi natija
Do'stlaringiz bilan baham: |