// Declaration: polypolygon (DC: HDC; {Device environment handle} var points; {point array} var npoints; {array, the array element is the number of vertices of each polygon} P4: INTEGER {Number of polygon, that is, the number of npoints elements}): bool;
// Example: Procedure tform1.formpaint (Sender: tobject); var PS: array [0 .. 9] of tpoint; PN: array [0 .. 1] of integer; begin {polygon 1:} PS [0]. x: = 50; PS [0]. y: = 50; PS [1]. x: = 100; PS [1]. y: = 50; PS [2]. x: = 125; PS [2]. y: = 75; PS [3]. x: = 100; PS [3]. y: = 100; PS [4]. x: = 50; PS [4]. y: = 100; PS [5]. x: = 25; PS [5]. y: = 75; {polygon 2:} PS [6]. x: = 200; PS [6]. y: = 25; PS [7]. x: = 300; PS [7]. y: = 25; PS [8]. x: = 300; PS [8]. y: = 125; PS [9]. x: = 200; PS [9]. y: = 125; PN [0]: = 6; {polygon 1 has 6 vertices} PN [1]: = 4; {polygon 2 has 4 vertices} polypolypolygon (canvas. handle, PS, Pn, 2); end;
//: