nanogui: New Alpha Blending
Subject:
New Alpha Blending
From:
Jordan Crouse ####@####.####
Date:
14 Feb 2002 00:10:02 -0000
Message-Id: <E16b9PA-0008VV-00@ns.censoft.com>
I have redesigned the alpha blending
system to use the excellent alpha blending macros from the imlib2 package
(thanks Rasterman!)
Get the patch here (its too big to send): http://cosmic.censoft.com/alpha.diff
We now have 4 alpha blending modes:
MWROP_BLEND (Blend)
blends source and destination according to a constant alpha
MWROP_BLENDADD (Add)
Adds source to the destination and adjusts it by a constant alpha
MWROP_BLENDSUBTRACT (Subtract)
Subtracts source from the destination and adjusts it by a constant alpha
MWROP_BLENDRESHADE (Reshade)
Shades the destination bits according to the source bits and a constant alpha
The alpha blending is currently only implemented for Truetype modes (0888,
888, 565, 555 and 332), though if someone wants to extend it to the palette
mode, that would be pretty cool.
Also included is a test application (nxalpha) that will demonstrate all of
the modes on a given image (ie, ./nxalpha tux.gif)
The code has been tested on 16 bit (555) and X11, so I would really
appreciate it if someone could put it through its paces in the other modes
and get back to me.
Enjoy!
Jordan