www.gnostice.com 

Chord Method

Top  Previous  Next

The Chord method draws a closed figure represented by the intersection of a line and an ellipse.

 

 

 

 

Syntax

 

 

[VC++]

void Chord(double X1, double Y1, double X2, double Y2, double X3, double Y3, double X4, double Y4, BOOL IsFill);

 

[C#]

public abstract new void Chord ( System.Double X1 , System.Double Y1 , System.Double X2 , System.Double Y2 , System.Double X3 , System.Double Y3 , System.Double X4 , System.Double Y4 , System.Boolean IsFill )

 

[VB]

Sub Chord(X1 As Double, Y1 As Double, X2 As Double, Y2 As Double, X3 As Double, Y3 As Double, X4 As Double, Y4 As Double, IsFill As Boolean)

 

 

 

 

 

Parameters

 

 

X1

[in] Specifies the x-coordinate of the upper-left corner of the bounding rectangle.

 

 

Y1

[in] Specifies the y-coordinate of the upper-left corner of the bounding rectangle.

 

 

X2

[in] Specifies the x-coordinate of the lower-right corner of the bounding rectangle.

 

 

Y2

[in] Specifies the y-coordinate of the lower-right corner of the bounding rectangle.

 

 

X3

[in] Specifies the x-coordinate of the endpoint of the radial defining the beginning of the chord.

 

 

Y3

[in] Specifies the y-coordinate of the endpoint of the radial defining the end of the chord.

 

 

X4

[in] Specifies the x-coordinate of the endpoint of the radial defining the beginning of the chord.

 

 

Y4

[in] Specifies the y-coordinate of the endpoint of the radial defining the end of the chord.

 

 

IsFill

[in] Specifies whether to fill the chord with current BrushColor or not.

 

 

Remarks

 

 

Use Chord to create a shape that is defined by an arc and a line that joins the end points of the arc. The chord consists of a portion of an ellipse that is bounded by the points (X1,Y1) and (X2,Y2). The ellipse is bisected by a line that runs between the points (X3,Y3) and (X4,Y4).

 

 

 

The perimeter of the chord runs counter clockwise from (X3, Y3), counterclockwise along the ellipse to (X4,Y4), and straight back to (X3,Y3). If (X3,Y3) and (X4,Y4) are not on the surface of the ellipse, the corresponding corners on the chord are the closest points on the perimeter that intersect the line. The outline of the chord is drawn using the value of Pen, and the shape is filled using the value of Brush.

 

 

 

 

Example Code

 

 

For an example code, see Shapes

 

 

 

 

See Also

 

 

Arc, Pie, Ellipse