This function draws an arc in the designated object (the screen, printer, or image data).

[C++Builder]     BOOL IKArc(LPVOID DeviceValue, LPRECT PrintRect, int x1, int y1, int x2, int y2, PTR_IKPRINT_DRAWINFO DrawInfo, BYTE DeviceMode);
[Delphi]         function IKArc(DeviceValue: THandle; var PrintRect: TRect; x1, y1, x2, y2: Integer; var DrawInfo: IKPRINT_DRAWINFO; DeviceMode: Byte): LongBool;

Parameters

Name Explanation
DeviceValue The device context or the raster image data (depending on the DeviceMode)
PrintRect Structure containing the coordinates of points for the area bounding the arc
x1,y1 x and y coordinates of the starting point of the arc
x2,y2 x and y coordinates of the ending point of the arc
DrawInfo Structure whose members set the drawing information
DeviceMode The designated object where the arc is drawn (0: Screen, 1: Printer, 2: Image data)

Return Value

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

Explanation

The IKArc function draws an arc in the designated object (the screen, printer, or image data). The PrintRect member variables contains the coordinates for points that specify a bounding rectangle in which the arc is drawn. The bounding rectangle defines the curve of the arc between the two points specified by the starting point (x1,y1) and ending point (x2,y2) of the arc. The arc extends from the specified starting point (x1,y1) to a point where it intersects a radial from the center of the bounding rectangle. The arc ends at the specified ending point (x2,y2) where it intersects another radial from the center of the bounding rectangle. If the end point and the starting point are the same, a complete ellipse is drawn.

To draw an arc, the PenStyle member of DrawInfo must be set. It is recommended that the PenWidth, PenMode, PenColor, Transparent and BackColor member variables also be set. The BackColor member is enabled when the Transparent member is zero and the pen is set to draw lines other than solid lines.

The IKArc 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 PrintRect, x1, y1, x2, y2 parameters are in pixel units.

If the DeviceMode parameter is 1 (the designated object is the printer) then PrintRect, x1, y1, x2, y2 parameters are in 0.1mm units.

The differences from the ImageKit5

Function Name Parameters
IK5Arc: DeviceValue, PrintRect, x1, y1, x2, y2, PrintInfo
IKArc: DeviceValue, PrintRect, x1, y1, x2, y2, DrawInfo, DeviceMode

PrintInfo and DrawInfo structures are different, however the member variables in PrintInfo are used in the same way in DrawInfo. The DeviceMode parameter has been added to this function in the ImageKit6 and 7. In the ImageKit5 this was set separately using the IKSetDeviceMode function.

The differences from the ImageKit6

The BackColor member variable has been added. If the Transparent member is not 0, then this function is the same as in the ImageKit6.

 

The ImageKit10 VCL is a product created by Newtone Corporation