home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.programmer
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!sdd.hp.com!caen!hellgate.utah.edu!fcom.cc.utah.edu!u.cc.utah.edu!tomj
- From: tomj@u.cc.utah.edu (Johnson)
- Subject: Re: Urgent Help Needed
- Message-ID: <1992Jul21.153009.18893@fcom.cc.utah.edu>
- Summary: Send the ADDRESS of the Rect
- Sender: tomj@iomega.com
- Organization: University of Utah Computer Center
- References: <1992Jul20.174636.6934@cerritos.edu> <9q@byu.edu>
- Date: Tue, 21 Jul 92 15:30:09 GMT
- Lines: 20
-
- In article <9q@byu.edu> gaow@bones.et.byu.edu (Jinsong Gao) writes:
- >Hi, I'd like to thank all who helped me for my previous questions. Now
- >I have another puzzle that I can't solve. It seems simple, but I am
- >desperately stuck. I use a few QuickDraw routines for manipulating Rects.
- >The problem is that non of them work. I always get a "pascal argument
- >wrong size" error message. Inside Macintosh Vol.I lists these routines as
- >taking a Rect. But no matter where my Rects come from (define a Rect, or
- >a windowptr->portRect), Iget this error. Is there any change to these
- >routines? If not, what do I have to do to use these routines (such as
- >SetRect, EraseRect, FrameRect, and OvalRect).
- >
- You must remember that in PASCAL (the language used to describe the
- interfaces in IM), any structure of over 4-bytes is automatically sent
- as a pointer to enhance speed. Thus, when IM says "ClipRect(r: Rect)",
- in Pascal, what it means to a C programmer is: "void ClipRect(Rect *r)",
- and would be called as: ClipRect(&myRect).
-
- Good Luck on meeting your deadline.
-
- Tom Johnson (tomj@iomega.com)
-