This method draws a polygon in the designated object.

[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Polygon(NativeUInt DeviceValue, const TPoint * Points, const int Points_Size, TVIkOutPutDeviceMode DeviceMode)
[C++Builder]   [ bool = ]imagekitcontrolname->PrintDraw->Polygon(void * DeviceValue, const TPoint * Points, const int Points_Size, TVIkOutPutDeviceMode DeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Polygon(DeviceValue: THandle; const Points: array of TPoint; DeviceMode: TVIkOutPutDeviceMode)
[Delphi]   [ Boolean = ]imagekitcontrolname.PrintDraw.Polygon(DeviceValue: Pointer; const Points: array of TPoint; DeviceMode: TVIkOutPutDeviceMode)

[TVIkOutPutDeviceMode Type]

Unit
     IkInit

type
     TVIkOutPutDeviceMode = (vikScreen, vikPrinter, vikMemoryHandle);

Parameters

Name Explanation
DeviceValue The device context or the raster image data depending on the DeviceMode
Points An array of x,y coordinates that specifies the polygon.
In C++Builder, the number of points -1 is passed into Points_Size
DeviceMode If vikScreen, then the polygon will be drawn in pixel units. If vikPrinter, the polygon will be drawn in 0.1mm units. If vikMemoryHandle, the polygon will be drawn (in pixel units) to the image memory handle

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The Polygon method draws a polygon in the designated object. 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 coordinates in the Points array. 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.

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

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

Differences between the ImageKit7/8/9/10

The x, y parameters have been changed to TPoint type.
In Delphi, it is not necessary to pass the size of the array.
In VCL the constants contain a "v". In ActiveX, the constants are: ikScreen, ikPrinter, ikMemoryHandle.

 

The ImageKit10 VCL is a product created by Newtone Corporation