TAgg2D.Polygon(xy, numPoints)
Description
Draws closed path consisting of an arbitrary number of linear segments.
Parameters
xy: PDouble
Pointer to the first element of an array containing polygon linear segments defined as x:y couples [in subpixels].
numPoints: integer
Determines, how many x:y couples are in the linear segments array defining a polygon.
Example
var i: integer; poly: array[1..40] of double; if VG.Attach(Image1.Picture.Bitmap) then begin VG.ClearAll(255, 255, 255); // Randomize polygon vertexes Randomize; for i := 1 to 20 do begin poly[i * 2 - 1 ] := random(ClientWidth - 20) + 10.5; poly[i * 2] := random(ClientHeight - 20) + 10.5; end; // Draw Polygon VG.LineWidth(3); VG.LineColor($FF, $00, $00); VG.FillColor($FF, $FF, $00); VG.Polygon(@poly[1], 20); end;



