This method 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 (i.e. Hdc or ImageHandle) depending on the DeviceMode parameter |
left,top | The x, y coordinates of the top left corner of the rectangle |
right,bottom | The x, y coordinates of the bottom right corner of the rectangle |
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 |
DeviceMode | If 0 (ikScreen), then the output will be drawn in pixel units. If 1 (ikPrinter), the output will be drawn in 0.1mm units. If 2 (ikMemoryHandle), the output will be drawn (in pixel units) to the image data according to the DeviceValue parameter |
In Visual Basic 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 Chord method 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 (left, top) and (right, bottom) parameters are 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 property and the chord is filled by the value set in the BrushStyle property. When drawing a chord, 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 draw a hatch pattern.
If the DeviceMode parameter is 0 or 2 then the left, top, right, bottom, x1, y1, x2, y2 parameters are in pixel units.
If the DeviceMode parameter is 1 then the left, top, right, bottom, x1, y1, x2, y2 parameters are in 0.1 mm units.