Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!rpi!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: GlobalToLocal() LocalToGlobal() information Message-ID: <16024@hoptoad.uucp> Date: 10 Mar 91 21:57:37 GMT References: <3744.27CD13AE@stjhmc.fidonet.org> <23417@well.sf.ca.us> <1991Mar7.203748.20407@jato.jpl.nasa.gov> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Electronics for Imaging, San Bruno CA Lines: 18 In article <1991Mar7.203748.20407@jato.jpl.nasa.gov> dundas@granite.Jpl.Nasa.Gov (John Dundas) writes: >In MPW, the following macros perform the equivalent function to their >ROM counterparts. > >#define GLOBALTOLOCAL(_pt) (((Point * )(_pt))->h += qd.thePort->portBits.bounds.left), \ > (((Point * )(_pt))->v += qd.thePort->portBits.bounds.top) >#define LOCALTOGLOBAL(_pt) (((Point * )(_pt))->h += -qd.thePort->portBits.bounds.left), \ > (((Point * )(_pt))->v += -qd.thePort->portBits.bounds.top) Except on color systems, on which they give nonsensical results.... -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Every year, thousands of new Randoids join the ranks. Most tend to be either too-rich self-made tycoons or picked-on computer nerds (the romantic, heroic individualism of Rand's novels flatters the former and fuels the latter's revenge fantasies)." -- Bob Mack, SPY, July 1989