Chord

Syntax

BOOL Chord(hDC,X1,Y1,X2,Y2,X3,Y3,X4,Y4)

This function draws a chord (a region bounded by the intersection of an ellipse and a line segment). The (X1, Y1) and (X2, Y2) parameters specify the upper-left and lower-right corners, respectively, of a rectangle bounding the ellipse that is part of the chord. The (X3, Y3) and (X4, Y4) parameters specify the endpoints of a line that intersects the ellipse. The chord is drawn by using the selected pen and filled by using the selected brush.

Parameter Type/Description  

hDC HDC Identifies the device context in which the chord will appear.  
X1 int Specifies the x-coordinate of the bounding rectangle's upper-left corner.  
Y1 int Specifies the y-coordinate of the bounding rectangle's upper-left corner.  
X2 int Specifies the x-coordinate of the bounding rectangle's lower-right corner.  
Y2 int Specifies the y-coordinate of the bounding rectangle's lower-right corner.  
X3 int Specifies the x-coordinate of one end of the line segment.  
Y3 int Specifies the y-coordinate of one end of the line segment.  
X4 int Specifies the x-coordinate of one end of the line segment.  
Y4 int Specifies the y-coordinate of one end of the line segment.  

Return Value

The return value specifies whether or not the arc is drawn. It is nonzero if the arc is drawn. Otherwise, it is zero.