Graphics.drawChord

Overview | Methods | This Package | All Packages

Graphics.drawChord

Draws a chord.

Syntax

public final void drawChord( Rectangle rect, Point start, Point end )

public final void drawChord( Rectangle rect, Point start, Point end, RasterOp op )

public final void drawChord( int x, int y, int width, int height, int startX, int startY, int endX, int endY )

public final void drawChord( int x, int y, int width, int height, int startX, int startY, int endX, int endY, RasterOp op )

Parameters

rect

A Rectangle object that specifies the bounding rectangle for the ellipse.

start

A Point object that specifies the starting point for the chord.

end

A Point object that specifies the ending point for the chord.

op

A RasterOp object that describes how to draw the chord.

x

The x-coordinate of the bounding rectangle for the ellipse.

y

The y-coordinate of the bounding rectangle for the ellipse.

width

The width of the bounding rectangle for the ellipse.

height

The height of the bounding rectangle for the ellipse.

startX

The x-coordinate for the chord's starting point.

startY

The y-coordinate for the chord's starting point.

endX

The x-coordinate for the chord's ending point.

endY

The y-coordinate for the chord's ending point.

Remarks

A chord is a region bounded by the intersection of an ellipse and a line segment (this intersection is called a secant. The chord drawn by this method is outlined using the current pen and is filled using the current brush.

The curve of the chord is defined by an ellipse that fits the specified bounding rectangle. The curve begins at the point at which the ellipse intersects the first radial, and extends counterclockwise to the point at which the ellipse intersects the second radial. (A radial is a lone segment drawn from the center of the ellipse to a specified endpoint on the ellipse).

The chord is closed by drawing a line from the the point at which the first radial and the curve intersect to the point at which the second radial and curve intersect.