🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.andrew
Article #1346

Re: PLANEMASK_ENV

#1346
From: Zalman Stern
Date: Fri, 09 Oct 1992 18:50
46 lines
2858 bytes
In article <wepP50m00Woi5W80ZR@andrew.cmu.edu> rr2b+@ANDREW.CMU.EDU (Robert  
Andrew Ryan) writes:
> In basics/x/xgraphic.c there is some code ifdefed on PLANEMASK_ENV. 
> Does anyone know what this is for, and if it is used by anyone?
> 
> Thanks for any info,
> -Rob Ryan
> Andrew Consortium
Really really vague memories gradually come back to me... (I didn't write  
this code though I've tried to find bugs in it.)

ATK used to do certain operations by setting the planemask to the xor of the  
foregound and background pixel values and then xor'ing in the foreground  
color. This allows you to get something like standard xor rubberbanding on a  
color display where you are only using two colors. (I think that at one time  
Xgraphic wired the planemask to this xor'ed value and left it that way until  
you changed the fore and back colors.)

There are a few problems with this: first actually using the planemask  
turned out to be dog slow on certain servers. Second, there were bugs in  
using the planemask on other servers. (Yet another X11 feature that you  
didn't want to use because it didn't get performance and QA attention.)  
Thirdly, this scheme completely falls apart when there are more than two  
colors in a window.

If I recall, PLANEMASK_ENV at one time set things up to do xor mode drawing  
by xor'ing with the xor of the fore and back colors instead of setting the  
planemask. I'm not sure which direction the flag went. Also, I think other  
stuff has been added under PLANEMASK_ENV that probably doesn't have anything  
to do with the above.

The last time I dealt with ATK (~two years ago), I had to compile it with  
different values of PLANEMASK_ENV for my 1 bit NCD and my 8 bit Magnum. And  
there were still a few bugs either way. I'd suggest figuring out what the  
correct X11 like thing to do is, riping out the PLANEMASK_ENV code (and  
anything else that looks suspect) and rewritting it. (Understand that at the  
time xgraphic was written, X11 theory and practice were relatively  
undeveloped. People actually believed GC's and Windows were dirt cheap for  
example.)

The above ramble may be pure fiction. If you'd like a more direct source,  
talk to Andy Palay or Mark Sherman.
--
Zalman Stern		   zalman@adobe.com		    (415) 962 3824
Adobe Systems, 1585 Charleston Rd., POB 7900, Mountain View, CA 94039-7900
  "Yeah. Ask 'em if they'll upgrade my shifters too." Bill Watterson
Technical Details
Message-ID: <1992Oct9.185048.7057@adobe.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!olivea!decwrl!adobe!usenet
References: <wepP50m00Woi5W80ZR@andrew.cmu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!ames!olivea!decwrl!adobe!usenet
From: zstern@adobe.com (Zalman Stern)
Newsgroups: comp.soft-sys.andrew
Subject: Re: PLANEMASK_ENV
Message-ID: <1992Oct9.185048.7057@adobe.com>
Date: 9 Oct 92 18:50:48 GMT
References: <wepP50m00Woi5W80ZR@andrew.cmu.edu>
Sender: usenet@adobe.com (USENET NEWS)
Organization: Adobe Systems Incorporated
Lines: 46