Re: [AD] [BUG] Mask color bug.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Eric Botcazou wrote :
> 
> > Actually I don't know if it is really a bug or a lack of documentation:/
> > The problem is that if I change the values of _rgb_[r|g|b]_shift32 then
> > the mask color does not change accordingly.
> 
> The mask colors are hard-coded in include/allegro/color.h
> 
> > And if I want bitmap_mask_color to return the "good value", I have to
> > change bmp->vtable->mask_color myself.
> 
> bitmap_mask_color() is only a wrapper for bmp->vtable->mask_color, which
> always use one of the hard-coded value and is set at bitmap creation through
> the vtable.
> 
> > Is it a normal behaviour ? Did I miss something ?
> 
> At least historical ;-)
> 
> I suppose you would like the mask color to be always pink whatever the color
> format is ?

Yes almost. Is it possible to change bitmap_mask_color() in something
which would look like that ?

if (bitmap_color_depth(bmp) == 8)
	return 0;
else
	return makecol_depth(bitmap_color_depth(bmp), 255, 0, 255);

Or may be some people do not like pink to be the transparent color ?
Docs tells explicitely that bright pink is the transparent color anyway.

	Bertrand.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/