Re: [AD] getpixel conflict with alpha blended sprites

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


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

We could add a seperate get_pixel_alpha() function?
IMHO though, the fix would be to expose the cipping rectangle detection, ie,
add a function that returns TRUE or FALSE depending on wether a point falls
within the clipping rectangle and have the value of get_pixel() be undefined
whenever that happens.
This is probably undoable because it breaks the API though... :(

I think that would break the API less than the first suggestion. What is geta() for if getpixel() doesn't return alpha? I thought reading alpha was a typical way of using getpixel(). And it is already trivial to check if you are reading outside the bitmap, by comparing with BITMAP->cl, BITMAP->cr, BITMAP->ct, BITMAP->cb.

Sven





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