This function draws a chord in the designated object (the screen, printer, or image data).
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 chord |
x2,y2 | x and y coordinates of the ending point of the chord |
DrawInfo | Structure whose members set the drawing information |
DeviceMode | The designated object where the chord is drawn (0: Screen, 1: Printer, 2: Image data) |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKChord function draws a chord in the designated object (the screen, printer, or image data). A chord is a region bounded by the intersection of an ellipse and a line segment. The PrintRect member variables contain the coordinates for points that specify a bounding rectangle which defines the ellipse. The chord begins at a specified starting point (x1,y1) where the ellipse intersects a radial from the center of the bounding rectangle. It ends at a specified ending point (x2,y2) where the ellipse intersects another radial from the center of the bounding rectangle. If the starting point and the ending point are the same, a complete ellipse is drawn. The chord is closed by drawing a line from the starting point to the ending point.
The outline of the chord is drawn from the value set in the PenStyle member of DrawInfo and the chord is filled by the value set in the BrushStyle member variable. When drawing a chord, it is recommended that the PenWidth, PenMode, PenColor, BrushColor, and Transparent member variables also be set.
The IKChord 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 |
---|---|
IK5Chord: | DeviceValue, PrintRect, x1, y1, x2, y2, PrintInfo |
IKChord: | 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.