[comp.sys.mac.programmer] Gray

cy03+@andrew.cmu.edu (Chao-Ping Yang) (07/23/89)

Can somebody tell me how to Frame with a gray line, like in DragrayRgn?
I looked through IM 1-5 and could not find anything, but you see
this kind of framing in almost any drawing programs.

==Chaoping

cy03@andrew.cmu.edu

cc100aa@prism.gatech.EDU (Ray Spalding) (07/29/89)

In article <YYmRTfy00WB201ilEk@andrew.cmu.edu> cy03+@andrew.cmu.edu (Chao-Ping Yang) writes:
>Can somebody tell me how to Frame with a gray line, like in DragrayRgn?
>I looked through IM 1-5 and could not find anything, but you see
>this kind of framing in almost any drawing programs.
>
>==Chaoping
>
>cy03@andrew.cmu.edu

Use:
	PenMode(patXor);
	PenPat(qd.gray);
	FrameRect(&rect);

When the rectangle you want to frame changes (e.g., the user moves the 
mouse with the button down), frame the OLD rectangle again:  in Xor mode,
this clears the old gray box from the screen.  Then, frame the new rectangle.
-- 
Ray Spalding
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp:     ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!cc100aa
Internet: cc100aa@prism.gatech.edu