mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 18:28:12 +02:00
21 lines
449 B
ObjectPascal
21 lines
449 B
ObjectPascal
const
|
|
Triangle: array[1..4] of PointType = ((X: 50; Y: 100), (X: 100; Y:100),
|
|
(X: 150; Y: 150), (X: 50; Y: 100));
|
|
|
|
begin
|
|
graphdefaults;
|
|
drawpoly
|
|
var Gd, Gm: Integer;
|
|
begin
|
|
Gd := Detect;
|
|
InitGraph(Gd, Gm, '');
|
|
if GraphResult <> grOk then
|
|
Halt(1);
|
|
drawpoly(SizeOf(Triangle) div SizeOf(PointType), Triangle);
|
|
readln;
|
|
fillpoly(SizeOf(Triangle) div SizeOf(PointType), Triangle);
|
|
graphdefaults;
|
|
readln;
|
|
CloseGraph;
|
|
end.
|