Language:
Русский
English
{Drawpoly.PAS}
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
{Sample code for the Drawpoly function.}
uses Graph;
const
Triangle: array[1..4] of PointType = ((X: 50; Y: 100), (X: 100; Y:100),
(X: 150; Y: 150), (X: 50; Y: 100));
var Gd, Gm: Integer;
begin
Gd := Detect;
InitGraph(Gd, Gm, '');
if GraphResult <> grOk then
Halt(1);
DrawPoly(SizeOf(Triangle) div SizeOf(PointType), Triangle);{ 4 }
Readln;
CloseGraph;
end.