Is XFixesCursorImage's alpha channel premultiplied?
Jonathan Lennox
lennox at cs.columbia.edu
Tue May 10 16:26:04 PDT 2005
I have a question about the cursor images returned by XFixesGetCursorImage()
for translucent cursors.
According to the documentation of XFixes in CVS,
<http://cvs.freedesktop.org/xlibs/FixesExt/protocol?view=markup>, in the
data returned by GetCursorImage, "the color components are pre-multiplied
with the alpha component." I believe that this means that a black pixel,
with 50% transparency, should be represented as 0x7f7f7f7f, as opposed to as
0x7fffffff.
However, I've written some code to retrieve cursor images and translate them
to PNGs, and it seems like this isn't the case. Using
XCURSOR_THEME=redglass, the PNGs I generate assuming that colors are not
premultiplied seem to be much closer to the actual screen appearance of the
actual cursors than the ones I generate when I assume that they are.
Is the documentation of GetCursorImage wrong? Or is there something else
I'm misunderstanding about GetCursorImage?
I'm using X.org 6.8.2 on FreeBSD 5.4-RELEASE, with the proprietary nvidia
drivers.
(I would attach the PNG images, but I don't know if the mailing list lets
through messages with attachments.)
--
Jonathan Lennox
lennox at cs dot columbia dot edu
More information about the xorg
mailing list