| Declare Function Chord Lib "gdi32.dll" (ByVal hdc As Long, ByVal X1 As Long, _ ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, ByVal X3 As Long, _ ByVal Y3 As Long, ByVal X4 As Long, ByVal Y4 As Long) As Long Chord draws an elliptical chord on a device. The chord is drawn using the device's currently selected pen and is filled using its currently selected brush. The chord consists of a line segment connecting two points along an ellipse; the area between the chord and the ellipse's edge is filled (going counterclockwise around the ellipse). The first two sets of (x,y) coordinate pairs specify the bounding rectangle which determines the ellipse. The last two sets of (x,y) pairs determine the points along the ellipse; the start and endpoints are determined by the intersection of a ray from the ellipse's center through the (x,y) coordinate and the ellipse. The function returns 1 if successful, or 0 if an error occured. hdc A device context to the device to draw the chord on. X1 The x-coordinate of the upper-left corner of the ellipse's bounding rectangle. Y1 The y-coordinate of the upper-left corner of the ellipse's bounding rectangle. X2 The x-coordinate of the lower-right corner of the ellipse's bounding rectangle. Y2 The y-coordinate of the lower-right corner of the ellipse's bounding rectangle. X3 The x-coordinate of the point determining the starting point of the chord. Y3 The y-coordinate of the point determining the starting point of the chord. X4 The x-coordinate of the point determining the ending point of the chord. Y4 The y-coordinate of the point determining the ending point of the chord. Example: ' Draw a chord on window Form1. The ellipse has a bounding rectangle ' of (10,20)-(210,120). The chord will have endpoints on the ellipse of (210,70) ' and (110,20) -- i.e., the "upper-right" portion of the ellipse. Draw the chord using ' Form1's current brush and pen. Dim retval As Long ' return value ' Draw the chord as specified above. retval = Chord(Form1.hDC, 10, 20, 210, 120, 210, 70, 110, 20) |
Chord Function |
India web developer web development India | Freelance web development ecommerce web developer | Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design