[SDL] How can I get a boolean representation of a surface?
Kevin Baragona
kevinmb500 at gawab.com
Thu Jun 15 16:14:37 PDT 2006
On Thu, 2006-06-15 at 12:13 -0700, Bill Kendrick wrote:
> On Thu, Jun 15, 2006 at 09:04:02PM +0200, Yoni Levy wrote:
> > Thanks,
> > I suspect there really is no simpler solution...
If it's not so simple to keep track of the used colorkey, you could just
blit it to two surfaces, a black and a white one, and compare whether
they blit the same color. Then you don't need to know what colorkey you
used. Imagine the beauty of the function
char** SDL_SurfaceGetMask(SDL_Surface * surface)
:)
>
> Well, if the surface is RLE-encoded internally, it may be possible to
> do it a little quicker, but damned if I know the details of how that works
> internally, and how to take advantage of it. :^/
>
> -bill!
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
More information about the SDL
mailing list