All Databases
Inside Mac - Basic Toolbox
Line
LineTo
Move
MoveTo
ShowPen
GrafPort
Line
Draw a line a specified distance
#include <
Quickdraw.h
>
Quickdraw
void
Line
(
distHoriz
,
distVert
);
short
distHoriz
; distance, in pixels to draw horizontally
short
distVert
; distance, in pixels to draw vertically
Line
moves the pen a specified distance from its current location, drawing a
line as it is moved.
distHoriz
is the distance, in pixels, to move the pen horizontally. Positive
values move to the right; negative to the left.
distVert
is the distance, in pixels, to move the pen vertically. Positive
values move down; negative move up.
Returns
: none
Notes: This is a quick way to draw a line with an endpoint a specified distance
from the current pen position. It is functionally identical to:
LineTo
(
thePort
->pnLoc.h+
distHoriz
,
thePort
->pnLoc.v +
distVert
);
If the pen is visible (see
ShowPen
), the line is drawn in the current pen
size, pattern, foreground color, and transfer mode. Note that since the pen
pattern actually hangs below and to the right of the pen position, this and all
drawing operations may affect an area beyond
horiz
and
vert
.
While recording a polygon or region (see
OpenPoly
and
OpenRgn
), the
line created is infinitely thin and is not affected by the pen size, pattern, or
mode.
Use
Move
or
MoveTo
move the pen without drawing.
Referenced by (142):
LineTo
Move
MoveTo
OpenPoly
OpenRgn
SlopeFromAngle
A Topics (MacTech Index)
C Languages (MacTech Index)
C Topics (MacTech Index)
G Authors (MacTech Index)
G Topics (MacTech Index)
L Topics (MacTech Index)
M Topics (MacTech Index)
Topics (MacTech Index)
U Topics (MacTech Index)
Vol 16 Issues (MacTech Index)
Vol 6 Issues (MacTech Index)
Framework Issue Index (Frameworks Archive)
July 92 - MacApp is Bedrock is MacApp (Frameworks Archive)
July 92 - OODL SIG is Now On-Line (Frameworks Archive)
March 93 - Camelot — Not Just Another Pretty Face (Frameworks Archive)
March 93 - Front-ending in MacApp (Frameworks Archive)
May 92 - WWDC News (Frameworks Archive)
Quickdraw (Inside Mac - Index)
Sad Mac Error Codes (Inside Mac - Index)
ScrpSTTable (Inside Mac - Index)
TEStyleTable (Inside Mac - Index)
WorldWide Software Overview (Inside Mac - Index)
wrUnderrun (Inside Mac - Index)
Accurate Line Measurement (Inside Mac - Basic Toolbox)
Caret Position at Line Ends (Inside Mac - Basic Toolbox)
Customizing TextEdit's Features (Inside Mac - Basic Toolbox)
Extensions to the Version 2 Picture format (Inside Mac - Basic Toolbox)
LineTo (Inside Mac - Basic Toolbox)
Move (Inside Mac - Basic Toolbox)
MoveTo (Inside Mac - Basic Toolbox)
OpenPoly (Inside Mac - Basic Toolbox)
OpenRgn (Inside Mac - Basic Toolbox)
ScriptUtil (Inside Mac - Basic Toolbox)
SlopeFromAngle (Inside Mac - Basic Toolbox)
TextEdit hooks (Inside Mac - Basic Toolbox)
Using WordRedraw for Line Calculations (Inside Mac - Basic Toolbox)
Using the lineStarts Array to Determine Line Length (Inside Mac - Basic Toolbox)
Word Selection and Line Breaks (Inside Mac - Basic Toolbox)
Character Reordering (Inside Mac - WWSO Mgr)
Defining Word Boundaries and Line Breaks (Inside Mac - WWSO Mgr)
Determining Word Selection: An Example (Inside Mac - WWSO Mgr)
IUGetItlTable (Inside Mac - WWSO Mgr)
Localizing Word Selection and Line Break Tables (Inside Mac - WWSO Mgr)
Localizing to Other Languages and Regions (Inside Mac - WWSO Mgr)
APL (MacTech Vol 01-1984-5)
Arrowheads (MacTech Vol 01-1984-5)
Grow Window in Asm (MacTech Vol 01-1984-5)
Iteration (MacTech Vol 01-1984-5)
Listbox in Dialog (MacTech Vol 01-1984-5)
May 85 Letters (MacTech Vol 01-1984-5)
Structure (MacTech Vol 01-1984-5)
Puzzles as Resources (MacTech Vol 02-1986)
Font Menu (MacTech Vol 03-1987)
Scrolling ZBASIC (MacTech Vol 03-1987)
Data Conversion (MacTech Vol 04-1988)
HyperCard 1.2 (MacTech Vol 04-1988)
MenuStuff (MacTech Vol 04-1988)
Wars and Windows (MacTech Vol 04-1988)
Designer CDEF (MacTech Vol 05-1989)
Meter Control (MacTech Vol 05-1989)
Typography (MacTech Vol 05-1989)
Fine Tune MPW (MacTech Vol 06-1990)
Line Art Rotation (MacTech Vol 06-1990)
MacWorld Aug 90 (MacTech Vol 06-1990)
Printing XCMD (MacTech Vol 06-1990)
Track, Field 2 (MacTech Vol 06-1990)
ADDMotion (MacTech Vol 07-1991)
Carbon Copy (MacTech Vol 07-1991)
External Windows 1 (MacTech Vol 07-1991)
HyperCom (MacTech Vol 07-1991)
IAC Toolkit 2 (MacTech Vol 07-1991)
Object Toolbox (MacTech Vol 07-1991)
Prog Assistants (MacTech Vol 07-1991)
Apr 92 Newsbits (MacTech Vol 08-1992)
Macsbug Template (MacTech Vol 08-1992)
True BASIC Returns (MacTech Vol 08-1992)
WWDC '92 (MacTech Vol 08-1992)
Apr 93 Newsbits (MacTech Vol 09-1993)
Aug 93 Think 10 (MacTech Vol 09-1993)
FORTRAN Debugging (MacTech Vol 09-1993)
Jun 93 Tidbits (MacTech Vol 09-1993)
Using SourceServer (MacTech Vol 09-1993)
CodeWarrior (MacTech Vol 10-1994)
Internet (MacTech Vol 10-1994)
Jan 94 Challenge (MacTech Vol 10-1994)
Jun 94 Top 10 (MacTech Vol 10-1994)
Mar 94 Challenge (MacTech Vol 10-1994)
Nov 94 Tips (MacTech Vol 10-1994)
Oct 94 Tips (MacTech Vol 10-1994)
Oct 94 Top 10 (MacTech Vol 10-1994)
Resorcerer 2 (MacTech Vol 10-1994)
Apr 95 Viewpoint (MacTech Vol 11-1995)
Feb 95 Tips (MacTech Vol 11-1995)
Feb 95 Viewpoint (MacTech Vol 11-1995)
Mar 95 Top 10 (MacTech Vol 11-1995)
Sep 95 Top 10 (MacTech Vol 11-1995)
Feb 96 Crabbs Apple (MacTech Vol 12-1996)
Jul 96 Crabbs Apple (MacTech Vol 12-1996)
Jul 96 Top 10 (MacTech Vol 12-1996)
Jun 96 Newsbits (MacTech Vol 12-1996)
May 96 Tips (MacTech Vol 12-1996)
May 96 Top 10 (MacTech Vol 12-1996)
CameraMan 3.0 (MacTech Vol 13-1997)
Jun 97 Factory Floor (MacTech Vol 13-1997)
OpenDialog Review (MacTech Vol 13-1997)
QD Antialiasing Techniques (MacTech Vol 13-1997)
StoneTable (MacTech Vol 13-1997)
Apr 98 - NewsBits (MacTech Vol 14-1998)
Jovis, a Database Engine (MacTech Vol 14-1998)
Oct 98 Tips (MacTech Vol 14-1998)
Aug 99 Getting Started (MacTech Vol 15-1999)
Nov 99 Newbits (MacTech Vol 15-1999)
OS Shell In Java (MacTech Vol 15-1999)
PCI For Mac Programmers (MacTech Vol 15-1999)
Random Walk Generator (MacTech Vol 15-1999)
Command Line Interface (MacTech Vol 16-2000)
Command Line Porting (MacTech Vol 16-2000)
Jan 00 NetManage (MacTech Vol 16-2000)
Jun 00 Viewpoint (MacTech Vol 16-2000)
Large Format Printing (MacTech Vol 16-2000)
REALbasic CGIs (MacTech Vol 16-2000)
Vol 16 Issues (MacTech Vol 16-2000)
Dec 00 Getting Started (MacTech Vol 17-2001)
DEVELOP by Author (J-M) (develop - Index)
April 90 - USING OBJECTS SAFELY IN OBJECT PASCAL (develop - 1990)
January 90 - THE PERILS OF POSTSCRIPT (develop - 1990)
July 90 - MACINTOSH DISPLAY CARD 8*24 GC: THE NAKED TRUTH (develop - 1990)
June 93 - WRITING LOCALIZABLE APPLICATIONS (develop - 1993)
September 94 - LETTERS (develop - 1994)
December 96 - KON & BAL'S PUZZLE PAGE: Folder Fun (develop - 1996)
December 96 - MPW Tips and Tricks: Automated Editing With StreamEdit (develop - 1996)
December 96 - QuickDraw GX Line Layout: (develop - 1996)
Develop Index 1996 (develop - 1996)
June 96 - MPW Tips And Tricks: Scripted Text Editing (develop - 1996)
September 96 - Graphical Truffles: A Library for Traversing Paths (develop - 1996)
September 96 - MPW TIPS AND TRICKS: Automated Editing With StreamEdit (develop - 1996)