Re: [AD] getpixel conflict with alpha blended sprites

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


Could we just consider getpixel() to be unreliable outside the BITMAP? For backward compatiblity, we need to keep the old behavior, but that should be depricated. That is, no (new) code should expect get_pixel() to return something meaningful if it's used outside the bitmap's area.

btw, don't clip rectangles apply only to pixel writes, not reads?


Evert Glebbeek wrote:
On Mon, Nov 17, 2003 at 12:19:20PM +0100, Sven Sandberg 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... :(

Evert


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl


--
- Robert Jr Ohannessian
http://bob.allegronetwork.com/






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