linkedin facebook linkedin facebook nod32

PaskalABC da qalam bilan ishlash

Muallif: Faxriddinov Sh.

Qo`shilgan sana: 2015-01-21

PaskalABC da qalam bilan ishlash

Bu qismda siz qalam bilan ishlashning turli protseduralarini o’rganasiz.

4.1 SetPenColor(color: integer)
program grafik4_1;
// SetPenColor(color: integer)
//berilgan rangni qalam rangi sifatida o'rnatadi
uses graphABC;
begin
setpencolor($ff0000);
line(20,20,320,20);
setpencolor($00ff00);
line(20,40,320,40);
setpencolor($0000ff);
line(20,60,320,60);
end.

4.2 SetPenWidth(w: integer)
program grafik4_2;
// SetPenWidth(w: integer)
//qalam kengligini w piksel qilib o'rnatadi
uses graphABC;
begin
//rang turi
setpencolor($ff0000);
setpenwidth(2);
//chiziq
line(20,20,320,20);
setpenwidth(12);
line(20,40,320,40);
setpenwidth(22);
line(20,80,320,80);
end.

4.3 SetPenStyle(ps: integer)
program grafik4_3;
//SetPenStyle(ps: integer)
//qalam stilini ps stilida tanlash protsedurasi
//psSolid-uzluksiz chiziq-0
//psClear-chiziqni o'chirish-1
//psDash-tireli chiziq-2
//psDot-nuqtali chiziq-3
//psDashDot-tire va nuqtali chiziq-4
//psDashDotDot-tire,nuqta va nuqtali chiziq-4
uses GraphABC;
begin
setpencolor($ff0000);setpenwidth(1);
setpenstyle(psSolid);line(20,20,320,20);
setpenstyle(psClear);line(20,40,320,40);
setpenstyle(psDash);line(20,60,320,60);
setpenstyle(psDot);line(20,80,320,80);
setpenstyle(psDashDot);line(20,100,320,100);
setpenstyle(psDashDotDot);line(20,120,320,120);
end.

4.4 SetPenMode(x: integer)
program grafik4_4;
//  SetPenMode(x: integer)
//qalamning chizish tartibini x ga mutanosib ravishda o'rnatadi
uses graphABC;
begin
setpencolor($ff0000);
setpenwidth(20);
setpenmode(pmCopy);
line(30,30,320,30);
setpenMode(pmnot);
line(30,120,320,120);
line(180,15,180,90);
setpenmode(pmCopy);
line(220,10,220,90);
end.

4.5 PenX: integer
program grafik4_5;
// PenX: integer
//qalam holatini butun son sifatida qaytaradi
uses graphABC;
begin
setwindowsize(400,200);
setpencolor($ff0000);
setpenwidth(10);
moveto(50,100);lineto(random(400),random(200));
setfontsize(12);
end.

4.6 PenY: integer
program grafik4_7;
// PenColor: integer
//qalamning joriy rangini qaytaradigan protsedura
uses graphABC;
var i:integer;
begin
setwindowsize(400,200);
setpenwidth(10);
setfontsize(12);
for i:=0 to 3 do
begin
setpencolor(random($FFFFFF));
line(20,20+i*50,380,20+i*50);
setfontcolor(pencolor);
textout(20,30+i*50,'Kesma rangi:
'+inttostr(pencolor));
end;
end.

4.8 PenWidth: integer
program grafik4_8;
//PenWidth: integer
//qalam chizadigan chiziq qalinligini butun son sifatida
//qaytaradigan protsedura
uses graphABC;
var i:integer;
begin
setwindowsize(400,200);
setpencolor($0000FF);
setfontsize(2);
setfontcolor($FF00000);
for i:=0 to 3 do
begin
setpenwidth(random(25));
line(20,10+i*50,380,10+i*50);
textout(20,30+i*50,'Informatika va AT: '+inttostr(penwidth));
end;
end.

4.9 PenStyle: integer;
program grafik4_9;
// PenStyle: integer;
//qalam joriy stilini butun son sifatida qaytaradi
uses graphABC;
begin
setwindowsize(400,200);
setpencolor($ff0000);
setpenwidth(1);
setpenstyle(psSolid);
line(20,20,320,20);
textout(350,10,inttostr(penstyle));setpenstyle(psClear);
line(20,40,320,40); textout(350,30,inttostr(penstyle));
setpenstyle(psDash); line(20,60,320,60);
textout(350,50,inttostr(penstyle)); setpenstyle(psDot);
line(20,80,320,80); textout(350,70,inttostr(penstyle));
setpenstyle(psDashDot); line(20,100,320,100);
textout(350,90,inttostr(penstyle)); setpenstyle(psDashDotDot);
line(20,120,320,120);
textout(350,110,inttostr(penstyle));
end.

4.10 PenMode: integer;
  program grafik4_10;
// PenMode: integer;
//qalamning qanday tartibda chizishini aniqlab
//uni butun son sifatida qaytaradigan protsedura
uses graphABC;
begin
setpencolor($ff0000);
setpenwidth(10);
setpenmode(pmCopy);
line(20,20,320,20);
textout(340,10,inttostr(penmode));
setpenMode(pmnot);
line(20,80,320,80);
textout(340,70,inttostr(penmode));
line(120,10,120,90);
textout(120,110,inttostr(penmode));
setpenmode(pmCopy);
line(220,10,220,90);
textout(220,110,inttostr(penmode));
end.

568 marta o`qildi.

Foydalanuvchi ismi: Oyrajab H 101
Qo`shilgan sana: 2015-04-08

yaxshi

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

testing

masalalar.zn.uz/

Turli xil mavzuda, internet mavzular, faqat masalalar.zn.uz saytda.


Рейтинг@Mail.ru
Рейтинг@Mail.ru

Besucherzahler
счетчик посещений