Program Procedury_Graficzne;
uses crt,graph;
var karta,tryb:integer;
Begin
DetectGraph(karta,tryb);
InitGraph(karta,tryb,'');
Rectangle(10,30,90,180);
SetFillStyle(1,Red);
Bar(150,30,230,180);
SetFillStyle(2,Blue);
Bar3d(290,30,370,180,10,true);
SetFillStyle(3,Green);
Bar3d(430,30,510,180,10,false);
OutTextXY(10,190,'Rectangle');
OutTextXY(150,190,'Bar');
OutTextXY(290,190,'Bar3d z daszkiem');
OutTextXY(430,190,'Bar3d bez daszku');
Circle(50,270,40);
Ellipse(170,270,0,360,15,40);
SetFillStyle(1,Magenta);
FillEllipse(290,270,40,15);
Arc(420,270,45,135,40);
SetFillStyle(1,Yellow);
PieSlice(540,270,20,160,40);
OutTextXY(10,330,'Circle');
OutTextXY(150,330,'Ellipse');
OutTextXY(250,330,'FillEllipse');
OutTextXY(400,330,'Arc');
OutTextXY(500,330,'PieSlice');
OutTextXY(10,450,'Wcisnij ENTER aby wypelnic puste figury za pomoca procedury FloodFill.');
ReadLn;
SetFillStyle(1,0);
Bar(0,450,getmaxx,460);
SetFillStyle(1,Cyan);
FloodFill(20,50,White);
FloodFill(50,270,White);
FloodFill(170,270,White);
OutTextXY(10,450,'Zostala wykonana procedura FloodFill, wcisnij dowolny klawisz.');
Readkey;
CloseGraph;
end.