tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: on Amiga, 16 color mode

> [...], but I [think] the X curser model is 1bit picture + 1bit mask

Right - with the note that the colours of the pointer cursor are not
necessarily related to any other colours on the screen.  In many cases
the hardware requires that they be so, and X gives servers the latitude
to do that (cursor components "may be transformed arbitrarily to meet
display limitations").

But, yes, a cursor is made from a 1bpp mask, which selects "displayed"
versus "not displayed", and a 1bpp image, which for the displayed
pixels selects "cursor foreground colour" versus "cursor background
colour" (and for the non-displayed pixels is ignored).  Cursors created
with CreateCursor make this explicit, taking two 1bpp pixmaps (or
sometimes just one, as an abbreviation for the case of the mask being
all "displayed" - a case many X servers mishandle); cursors created
with CreateGlyphCursor are similar "except the source and mask bitmaps
are obtained from the specified font glyphs".  (Modern audiences, used
to things such as subpixel rendering and antialiasing, should remember
that in core X font glyphs are strictly 1bpp, deepened to the display's
depth only when rendered, and even then with every pixel either wholly
written (whatever that means for the GC and drawable in question) or
wholly unwritten.)

> while the Amiga sprites are 2 bit, where the one of the four
> combinations is transparent.

Yes, I too have seen hardware with similar cursor capabilities, capable
of displaying three-colour cursors.  Core X has no direct way to use
that third colour, at least not for the pointer cursor, though it would
not be difficult to define an extension for it.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index