Re: [AD] getpixel conflict with alpha blended sprites

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


Eric Botcazou wrote:
So, if I wanted to read an entire pixel, including the alpha channel,
how would I do that?

The question is: is it more useful for getpixel() to return correct informations on the position or on the alpha channel? I tend to favor the former because it's obviously the original design; that said, if the latter is currently more widely used...

Well, I don't know what is more widely used, but there is another question that is at least as relevant IMHO: now that both types of functionality can't live together, so that one has to go away, which one is easier to work around? To my knowledge the answer is: it is trivial to test manually if the pixel is outside the bitmap, but for general BITMAPs there is no other way to get the alpha value than via getpixel(). So that's an argument in favor of keeping the current behavior.

I'd prefer adding a warning in the documentation for getpixel(), and possibly a simple function to test if a point is inside the clip rectangle, if anything.

--
Sven





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