[SDL] How to set an individual pixel to transparent?
matt hull
mattmatteh at mac.com
Sun Sep 23 21:02:46 PDT 2007
i havent messed with transparent pixels before, but here is info from
the wiki about the pixel format,
http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fPixelFormat
you should use this to find what the rgb format is. no need for
#ifdef bigendian, if you have that.
i would guess you are trying to use the apha on the pixel ?
matt
On Sep 23, 2007, at 9:02 PM, David Bruce wrote:
> Hi,
>
> Quick question - if p points to an individual pixel in a 32-bit RGBA
> SDL_Surface, how do I set it to transparent for either a little- or
> big-endian system?
>
> (I'm trying to write a function to round off the corners of
> rectangles, and I
> think I've figured the rest out, but I'm having trouble with the
> actual
> manipulation of the pixel data).
>
> Thanks for any help,
> --
> David Bruce
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
More information about the SDL
mailing list