" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
program flaga;
2.
uses crt, graph;
3.
var
4.
karta,tryb:smallint;
5.
const f1 : array[1..3] of PointType = ((X:0;Y:64), (X:303;Y:267), (X:0;Y:469) );
6.
const f2 : array[1..3] of PointType = ((X:0;Y:107), (X:239;Y:267), (X:0;Y:426));
7.
const f3 : array[1..6] of PointType = ((X:97;Y:0),(X:415;Y:213),(X:800;Y:213),(X:800;Y:178),(X:428;Y:178),(X:161;Y:0));
8.
const f4 : array[1..6] of PointType = ((X:97;Y:533),(X:415;Y:320),(X:800;Y:320),(X:800;Y:355),(X:428;Y:355),(X:161;Y:533));
9.
const f5 : array[1..4] of PointType = ((X:161;Y:0),(X:428;Y:178),(X:800;Y:178),(X:800;Y:0));
10.
const f6 : array[1..4] of PointType = ((X:161;Y:533),(X:428;Y:355),(X:800;Y:355),(X:800;Y:533));
11.
begin
12.
detectgraph(karta,tryb);
13.
initgraph(karta,tryb,'');
14.
ClearDevice;
15.
SetColor(2);
16.
SetFillStyle(1,2);
17.
Bar(0,0,800,533);
18.
setcolor(14);
19.
FillPoly( 3, f1 );
20.
setcolor(0);
21.
FillPoly( 3, f2 );
22.
setcolor(15);
23.
FillPoly( 6, f3 );
24.
FillPoly( 6, f4 );
25.
setcolor(12);
26.
FillPoly( 4, f5 );
27.
setcolor(9);
28.
FillPoly( 4, f6 );
29.
30.
readkey;
31.
closegraph;
32.
end.
A tutaj możesz zobaczyć jak to wygląda: http://pastebin.com/7auuBnfE