This function draws a polygon in the designated object.
Parameters
Name | Explanation |
---|---|
DeviceValue | The device context or the raster image data (depending on the DeviceMode) |
lpPoint | A structure defining coordinates for the points of
the polygonal area on the image
In C++Builder and Visual C++, pass the pointer to the first element in the structure array In Delphi, if Pt is an array of TPoint, then the arguments are returned in the first elements of the array Pt[0] In Visual Basic, if Pt is an array of IKPOINT, then the arguments are returned in the first elements of the array Pt(0) |
Points | The number of points defining the polygonal area on the image (2 or more), i.e. the number of points in the lpPoint array |
DrawInfo | Structure whose members set the drawing information |
DeviceMode | The designated object where the polygon is drawn (0: Screen, 1: Printer, 2: Image data) |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKPolygon function draws a polygon in the designated object. This function 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 endpoint to the starting point. The points are specified by the IpPoint structure. The outline of the polygon is drawn from the value set in the DrawInfo structure PenStyle member variable and the polygon is filled by the value set in the BrushStyle member variable. When drawing a polygon, it is recommended that the PenWidth, PenMode, PenColor, BrushColor, and Transparent member variables also be set.
This function can draw in the following designated objects: screen, printer, and image data.
If the DeviceMode parameter is 0 or 2 (the designated object is the screen or the image data) then the lpPoint member variables are in pixel units.
If the DeviceMode parameter is 1 (the designated object is the printer) then the lpPoint member variables are in 0.1mm units.
The differences from the ImageKit5
Name | Explanation |
---|---|
IK5Polygon: | DeviceValue, lpPoint, Points, PrintInfo |
IKPolygon: | DeviceValue, lpPoint, Points, DrawInfo, DeviceMode |
PrintInfo and DrawInfo structures are different, however the member variables in PrintInfo are used in the same way in DrawInfo. If you set the Transparent parameter to True and then set the DeviceMode parameter to the value that you used in the ImageKit5 IKSetDeviceMode, then there is no difference between this function in the ImageKit8 and the ImageKit5.
The differences from the ImageKit6
BackColor has been added. If you set the Transparent parameter to True, there is no difference between this function in the ImageKit8 and the ImageKit6.