This method draws a polygon in the designated object. This method is recommended when using scripting or other languages that require variant types.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.PrintDraw.PolygonVariant(DeviceValue As LONG_PTR, x As Variant, y As Variant, DeviceMode As OutPutDeviceModeConstants)
[VB.NET]   [ Boolean = ]imagekitcontrolname.PrintDraw.PolygonVariant(DeviceValue As Integer(x86) or Long(x64), ByRef x As Object, ByRef y As Object, DeviceMode As ImageKit10(A)Lib.OutPutDeviceModeConstants)
[C#.NET]   [ bool = ]imagekitcontrolname.PrintDraw.PolygonVariant(int(x86) or long(x64) DeviceValue, ref object x, ref object y, ImageKit10(A)Lib.OutPutDeviceModeConstants DeviceMode)

* ImageKit10ALib refers to the ANSI version, ImageKit10Lib refers to the Unicode version, (x86) refers to the 32 bit version, and (x64) refers to the 64 bit version.

Parameters

Name Explanation
DeviceValue The device context or the raster image data (i.e. Hdc or ImageHandle) depending on the DeviceMode
x,y An array of x and y coordinate values defining points of the polygon
DeviceMode If 0 (ikScreen), then the polygon will be drawn in pixel units. If 1 (ikPrinter), the polygon will be drawn in 0.1mm units. If 2 (ikMemoryHandle), the polygon will be drawn (in pixel units) to the image data according to the DeviceValue parameter
* NOTE for retrieving array values:
In Visual Basic / VB.NET, if Dim x(0 to 2), then the arguments are returned in x.
In C#.NET the arguments are returned in ref x.

The following constants can be used: (ikScreen = 0, ikPrinter = 1, ikMemoryHandle = 2).

Return Value

Returns True (nonzero) if successful. Returns False (0) if unsuccessful.

Explanation

The Polygon method draws a polygon in the designated object.

This method is recommended when using scripting or other languages that require variant types or when using 64 bit builds in VB.NET or C#.

This method draws a straight line from a designated point to another point and from there to subsequent points. The polygon is closed by drawing a line from the end point to the starting point. The points are specified by the x and y parameter arrays. The outline of the polygon is drawn from the value set in the PenStyle property and the polygon is filled by the value set in the BrushStyle property. This method can draw in the following designated objects: screen, printer, and image data. When drawing a polygon, it is recommended that the PenWidth, PenMode, PenColor, BrushColor, Transparent, and BackColor properties also be set. The BackColor property is enabled when the Transparent property is False and the pen is set to draw lines other than solid lines or the brush is set to hatch pattern.

Also see the Polygon method.

If the DeviceMode parameter is 0 or 2 then x and y parameters are in pixel units.

If the DeviceMode parameter is 1 then x and y parameters are in 0.1mm units.

Differences between the ImageKit7/8

The DeviceValue argument's type has changed.

 

The ImageKit10 ActiveX is a product created by Newtone Corporation