Declare Function Chord Lib "gdi32.dll" (ByVal hdc As Long, ByVal nLeftRect As Long, ByVal nTopRect As Long, ByVal nRightRect As Long, ByVal nBottomRect As Long, ByVal nXRadial1 As Long, ByVal nYRadial1 As Long, ByVal nXRadial2 As Long, ByVal nYRadial2 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 start and end points of the chord's elliptical arc are determined by two radials (drawn from the ellipse's center out to a point). The point where a radial and the ellipse intersect is the start or end point of the chord's arc.
If an error occured, the function returns 0 (Windows NT, 2000: use GetLastError to get the error code). If successful, the function returns a non-zero value.
None.
' This code is licensed according to the terms and conditions listed here.
' 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)
Go back to the alphabetical Function listing.
Go back to the Reference section index.
Last Modified: September 10, 1999
This page is copyright © 1999 Paul Kuliniewicz.
Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/c/chord.html