Accusoft PrintPRO 8
DrawPolygon Method
Single-precision value indicating the x coordinate for the first vertex of a polygon.
Single-precision value indicating the y coordinate for the first vertex of a polygon.
Single-precision value indicating the x coordinate for the second vertex of a polygon.
Single-precision value indicating the y coordinate for the second vertex of a polygon.
Single-precision value indicating the x coordinate for the third vertex of a polygon.
Single-precision value indicating the y coordinate for the third vertex of a polygon.
Single-precision value indicating the x coordinate for the fourth vertex of a polygon.
Single-precision value indicating the y coordinate for the fourth vertex of a polygon.
Single-precision value indicating the X coordinate for the fifth vertex of a polygon.
Single-precision value indicating the y coordinate for the fifth vertex of a polygon.
Single-precision value indicating the x coordinate for the sixth vertex of a polygon.
Single-precision value indicating the y coordinate for the sixth vertex of a polygon.
Long integer value indicating the RGB color of the polygon’s outline. You can use the RGB function or QBColor function to specify the color.
The number of valid coordinates defining the polygon.
Description

Creates a three to six sided polygon on a document to be printed.

Syntax
Visual Basic
Public Sub DrawPolygon( _
   ByVal X1 As Single, _
   ByVal Y1 As Single, _
   ByVal X2 As Single, _
   ByVal Y2 As Single, _
   ByVal X3 As Single, _
   ByVal Y3 As Single, _
   ByVal X4 As Single, _
   ByVal Y4 As Single, _
   ByVal X5 As Single, _
   ByVal Y5 As Single, _
   ByVal X6 As Single, _
   ByVal Y6 As Single, _
   ByVal penColor As OLE_COLOR, _
   ByVal numPoints As Long _
) 
Parameters
X1
Single-precision value indicating the x coordinate for the first vertex of a polygon.
Y1
Single-precision value indicating the y coordinate for the first vertex of a polygon.
X2
Single-precision value indicating the x coordinate for the second vertex of a polygon.
Y2
Single-precision value indicating the y coordinate for the second vertex of a polygon.
X3
Single-precision value indicating the x coordinate for the third vertex of a polygon.
Y3
Single-precision value indicating the y coordinate for the third vertex of a polygon.
X4
Single-precision value indicating the x coordinate for the fourth vertex of a polygon.
Y4
Single-precision value indicating the y coordinate for the fourth vertex of a polygon.
X5
Single-precision value indicating the X coordinate for the fifth vertex of a polygon.
Y5
Single-precision value indicating the y coordinate for the fifth vertex of a polygon.
X6
Single-precision value indicating the x coordinate for the sixth vertex of a polygon.
Y6
Single-precision value indicating the y coordinate for the sixth vertex of a polygon.
penColor
Long integer value indicating the RGB color of the polygon’s outline. You can use the RGB function or QBColor function to specify the color.
numPoints
The number of valid coordinates defining the polygon.
Remarks

Specify as many coordinates as needed to define the polygon (3 for a triangle, 4 for a square, etc.) and pass this number as numPoints. All six coordinates must be passed to this method but the pairs beyond numPoints are ignored.

The coordinates of the polygon must be within the physical area of the printed page.

To fill a polygon, set the FillColor and FillStyle properties of the object on which the polygon is drawn.

The width of the line used to draw the polygon depends on the setting of the DrawWidth property.

The way the polygon is drawn on the background depends on the setting of DrawMode and DrawStyle properties.

If a printer has not been selected or a document has not been started, the DrawPolygon method will select the default printer and start a new document.

You can omit an argument in the middle of the syntax, but you must include the argument’s comma before including the next argument. If you omit an optional argument, omit the comma following the last argument you specify.

When DrawPolygon executes, the CurrentX and CurrentY properties are set to the last valid vertices of the polygon.

See Also

PrintPro Object  | PrintPro Members

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback