Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!rj0z+ From: rj0z+@andrew.cmu.edu (Robert George Johnston, Jr.) Newsgroups: comp.sys.mac.programmer Subject: Hilite Mode Error Message-ID: <4Y2CH4y00VE1MC7EUf@andrew.cmu.edu> Date: 27 Feb 89 06:03:48 GMT Organization: Class of '91, Carnegie Mellon, Pittsburgh, PA Lines: 33 In Volume V of Inside Macintosh, on page 61, an explanation of how to use the Hilite Mode follows: There are two ways to use the hilite mode. The easiest is to call BitClr(Ptr(HiliteMode, pHiliteBit)); just before calling InvertRect, InvertRgn, InvertArc, InvertRoundRct, or InvertPoly or any drawing using srcXor mode. On a one-bit-deep destination, this will work exactly like inversion, and is compatible with all versions of QuickDraw. Consider the following Pascal code: begin PenMode(srcXor); BitClr(Ptr(HiliteMode, pHiliteBit)); FrameRect(SomeRect); end; On a Macintosh equipped with Color QuickDraw, this procedure acts as expected, by drawing a rectangle in the current hilite color. If the screen is only one-bit-deep, it also acts accordingly by inverting the frame of the rectangle. Now, this same code, when executed on a regular SE or Plus without Color QuickDraw will NOT draw anything to the screen. I then discovered that if I set the PenMode to patXor, the procedure then functions exactly to specifications. I have not tried this out on other drawing routines like FrameOval. I am using Lightspeed Pascal 2.0p1, System Software 6.0.2. Perhaps somebody should look into whether the book is wrong or the implementation is wrong. Rob Johnston.