Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 3 - QuickDraw Drawing / QuickDraw Drawing Reference
Routines / Drawing Lines


Line

To draw a line a specified distance from the graphics pen's current location in the current graphics port, use the Line procedure.

PROCEDURE Line (dh,dv: Integer); 
dh
The horizontal distance of the graphics pen's movement.
dv
The vertical distance of the graphics pen's movement.
DESCRIPTION
Starting at the current location of the graphics pen, the Line procedure draws a line the horizontal distance that you specify in the dh parameter and the vertical distance that you specify in the dv parameter. The Line procedure calls

LineTo(h+dh,v+dv)
where (h,v) is the current location in local coordinates. The pen location becomes the coordinates of the end of the line after the line is drawn. If you are using Line to draw a region or polygon, its outline is infinitely thin and is not affected by the values of the pnSize, pnMode, and pnPat fields of the graphics port.

SPECIAL CONSIDERATIONS
The Line procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.

SEE ALSO
Listing 3-1 on page 3-15 illustrates how to use this procedure.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996