Polygon Method

Structured Graphics Control

Creates a closed polygon defined by a list of points, filled with the current color set in SetFillColor method.

Syntax

HTML<PARAM NAME="Line0001" VALUE="Polygon( nPoints, x1, y1, x2, y2, x3, y3 [, x4, y4 ...], rotation )">
ScriptingSGObj.Polygon( nPoints, x1, y1, x2, y2, x3, y3 [, x4, y4 ...], rotation )
FilePolygon( nPoints, x1, y1, x2, y2, x3, y3 [, x4, y4 ...], rotation )

Parameters

nPoints
Total number of points.
x1, y1
First point defining the shape.
x2, y2
Second point defining the shape.
x3, y3
Third point defining the shape.
x4, y4
Additional points that define the shape.
rotation
Degree of rotation from the 0 degrees position.

Remarks

If you don't want to close the polygon, use the PolyLine method.

Example

The following example creates an elongated hexagon.

<PARAM NAME="Line0005" VALUE="Polygon(6, 0,10, 10,10, 30,30,
30,40, 20,40, 0,20, 0)">

Right-click inside the frame and choose View Source to see the HTML code for the Polygon method example.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.