Graphics.drawLine

Overview | Methods | This Package | All Packages

Graphics.drawLine

Draws a line from one point to another using the current pen.

Syntax

public final void drawLine( Point p1, Point p2 )

public final void drawLine( Point p1, Point p2, RasterOp op )

public final void drawLine( int x1, int y1, int x2, int y2 )

public final void drawLine( int x1, int y1, int x2, int y2, RasterOp op )

Parameters

p1

A Point object that specifies the coordinates at which to begin drawing the line.

p2

A Point object that specifies the coordinates at which to stop drawing the line.

x1

The x-coordinate at which to begin drawing the line.

y1

The y-coordinate at which to begin drawing the line.

x2

The x-coordinate at which to stop drawing the line.

y2

The y-coordinate at which to stop drawing the line.

op

A RasterOp object that describes how to draw the line.

See Also   drawLines