program poly;
uses graph;
var gd,gm,gr:integer;
p:array[1..3] of PointType;
begin
gd:=VGA;
gm:=VGAHi;
InitGraph(gd,gm,'');(*..\..\tp\bgi*)
gr:=GraphResult;
if gr=grOk then begin
SetColor(red);
p[1].x:=50;
p[1].y:=50;
p[2].x:=200;
p[2].y:=100;
p[3].x:=50;
p[3].y:=100;
SetFillStyle(LtSlashFill,green);
FillPoly(3,p);
readln;
CloseGraph;
end else
writeln(GraphErrorMsg(gr));
end.
