Share via


Overview | Methods | This Package | All Packages

OverviewMethodsThis PackageAll Packages

Graphics.drawLine

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

Syntax

public final void drawLine( Pointp1, Pointp2**)**

public final void drawLine( Pointp1, Pointp2, RasterOpop**)**

public final void drawLine( intx1, inty1, intx2, int*y2*****)

public final void drawLine( intx1, inty1, intx2, inty2, RasterOpop**)**

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