[comp.windows.misc] Polarity of set in MGR

alundin@carina.unm.edu (Alan Lundin) (07/06/90)

I'm confused on the sematics of the m_func B_SET operation.  It appears
that 'set' means to turn a pixel on/off depending on the default background
color.  Using the 3b1 port (many thanks to Brad Bosch and Brian Botton)
which defaults to white-on-black, a 'set' turns the pixel(s) on (white),
but surely on a SUN with a black-on-white screen it must turn the pixel
off.  When I send a m_setmode(M_WOB) to the window for a SUN-like
black-on-white window, the demo programs (stringart, hilbert) don't
do anything--I presume because they are 'set'ing the pixel.  Should
'set' do the oppose of the background color, or do the applications
need to be written to check the background color and do the appropriate
B_SET/B_CLEAR with m_func?

BTW, many thanks to Steve Ulher for writing and releasing this wonderful
windowing package!  I'm suddenly not very interested in X-windows any more,
thanks to MGR and am very impressed by MGR's simplicity and elegance.
MGR is the only windowing package I've seen that I'd call a 'tool'.

Alan Lundin <alundin@carina.unm.edu>

alundin@carina.unm.edu (Alan Lundin) (07/11/90)

I received the following from <sau@breeze.bellcore.com (Stephen A Uhler)>
and thought it would be of general interest:
> BIT_SET turns the appropriate bits in memory to 1's (e.g. "on"). On
> suns 1 is black, 0 is white.  I don't know about the 3B1 version, as I
> don't have one.  In theory, setmode(M_WOB) causes BIT_SET to set the
> appropriate bits to 0's.  If it doesn't on the 3B1, it is probably a
> bug  (The code is a bit suspect in the SUN code as well).

Thanks Stephen!

--Alan Lundin