Adds a polygon to the current page.

 

   

Syntax
 

GraphicID = Doc.AddPoly(Points, Filled)

 

   

Params
 
Name Type Description
Points String The coordinates of the vertices of the polygon.
Filled Boolean Whether to fill the polygon rather than simply outline it.
GraphicID Long The Object ID of the newly added Graphic object.

 

   

Notes
 

Adds a polygon to the current page. The polygon is drawn in the current color at the current width and with the current options. The polygon may be outlined or filled.

The points string is a sequence of numbers representing the coordinates of the polygon. The string should be of the format "x1 y1 x2 y2 ... xN yN". The numbers may be delimited with spaces, commas or semicolons. If the first point is equal to the last then the path is closed before outlining.

The AddPoly method returns the Object ID of the newly added Graphic object.

 

   

Example
 

The following code adds a transparent green outlined star over the top of a red filled star.

Set theDoc = Server.CreateObject("ABCpdf10.Doc")
theDoc.Width = 80
theDoc.Color = "255 0 0"
theDoc.AddPoly "124 158 300 700 476 158 15 493 585 493 124 158", True
theDoc.Color = "0 255 0 a128"
theDoc.AddPoly "124 158 300 700 476 158 15 493 585 493 124 158", False
theDoc.Save "c:\mypdfs\docaddpoly.pdf"


docaddpoly.pdf