I was hoping to support alpha sprites in set_mouse_sprite(), but never
mind, maybe in 4.3! (at the moment, the built-in mouse cursor is
generated with zero alpha and is therefore invisible in 32bit mode)
By the way, in OS X, I often come across premultiplied alpha i.e each
of the colour components are already multiplied by the fraction alpha.
For example, a 50% translucent pure red would be (r=0.5, g=0.0, b=0.0,
a=0.5), not (r=1.0, g=0.0, b=0.0, a=0.5)
Does it make sense to do this in Allegro?
Pete
On 7/30/06, Elias Pschernig <elias@xxxxxxxxxx> wrote:
On Sun, 2006-07-30 at 11:21 +0100, Peter Hull wrote:
I noticed that makecol always returns a colour with zero alpha in 32
bit mode. This seems a bit useless; is there a good reason for it?
makecol just delegates to makecol32, which would be trivial to fix
(see below). However I'm not quite sure where the bitmap mask colour
comes from - should this be magic pink with zero alpha or magic pink
with 255 alpha?
In 4.2, alpha is generally unsupported currently, and in 32-bit mode I
guess the alpha component should be ignored with masked blitting (don't
know if it is the case though).
Where alpha is supported is only as various special blenders, for
blitting with set_alpha_blender() and draw_sprite().
I agree that it is useless when working with e.g. AllegroGL. But I'm not
sure we can change it now. For 4.3 though, alpha should just be another
color component like r, g, b and nothing special. And color keying would
be the special case.
So:
AL_COLOR c = al_color_f(1, 0, 0, 0.5);
al_line(x1, y1, x2, y2, c);
(or however the API will look, I have no idea) should draw a red line
with 50% transparency.
--
Elias Pschernig
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
https://lists.sourceforge.net/lists/listinfo/alleg-developers
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV