drawChord

drawChord(x1:     Real;
          y1:     Real;
          x2:     Real;
          y2:     Real;
          startX: Real;
          startY: Real;
          endX:   Real;
          endY:   Real;
          color:  Integer);

The drawChord method of the Window class draws a segment of an ellipse arc on a form or control using a colored pen the width of the drawWidth property, the style of the drawStyle property, and the mode of the drawMode property.

If this method is not called from a paint event, set the autoRedraw property to true.

The segment of the ellipse is bounded by an elliptical arc and the straight line that joins the end points of the arc. A line is drawn through the end points of the arc, and the figure is filled using the color and style of the drawFillColor and drawFillStyle properties of the object.

The drawChord method parameters are listed in the following table.

Parameter Description
x1, y1, x2, y2 Rectangle bounding the ellipse of which the arc is a part
startX, startY Logical x and y (horizontal and vertical) coordinates of the point that defines the starting point of the arc
endX, endY Logical x and y coordinates of the point that defines the end point of the arc
color Color of the pen used

The position units of the parameters are Real primitive type values in the units of the scaleMode property of the form or control. The startX, startY, endX, and endY parameter points do not need to lie exactly on the arc.

The starting point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified starting point intersects the ellipse. The end point of the arc is the point at which a ray drawn from the center of the bounding rectangle through the specified end point intersects the ellipse. The arc is drawn in a counterclockwise direction.

The width and height of a rectangle must each be in the range 2 units through 32,767 units.