PolyLine

The Polyline function draws a series of line segments by connecting the points in the specified array. This function draws a filled polygon too, depending of its parameters.

PolyLine sFill, aPoints

Parameters

sFill
The string specifying how to fill an polygon. The possible values are:
StringMeaning
"" No fill, a polyline will be drawn
"ALTERNATE" The filled polygon will be drawn. The polygon is closed automatically by drawing a line from the last vertex to the first. The area between odd-numbered and even-numbered polygon sides on each scan line will be filled.
"WINDING" The filled polygon will be drawn. The polygon is closed automatically by drawing a line from the last vertex to the first. Any region with non-zero winding value will be filled.

aPoints
Either one dimensional or two dimensional array specifying the vertices of the polygon.
In case of two dimensional array the left-most index of array is the number of point. The right-most index of array is coordinate - x or y.
In case of one dimensional array the elements of array are elements of points coordinates in the sequence: X1,Y1,X2,Y2,... etc.

Example (random polygon)
View result

<%
Response.Contenttype="image/gif"
Randomize()
Dim pts(20,1)
size=401
for i=0 to 20
	pts(i,0)=Rnd(1)*size
	pts(i,1)=Rnd(1)*size
next
pts(0,0)=0
pts(0,1)=0
set obj=Server.CreateObject("shotgraph.image")

obj.CreateImage size,size,4
obj.SetColor 0,255,255,255
obj.SetColor 1,0,0,0
obj.SetColor 2,153,153,204
obj.SetColor 3,153,0,153
obj.SetBgColor 0
obj.FillRect 0,0,size-1,size-1
obj.SetBgColor 2
obj.SetDrawColor 1

obj.PolyLine "ALTERNATE",pts

Response.BinaryWrite obj.GifImage(-1,1,"")
%>