Why doesnt SDL_FillRect() take an SDL_Color?

Subject says it all? Since it doesn’t, whats the easiest way to convert an
SDL_Color to Uint32?–
Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org

“You want free speech? Let’s see you acknowledge a man whose words make
your blood boil who is standing center stage advocating at the top of
his lungs that which you would spend a lifetime opposing at the top of
yours.” – President Andrew Shephard, “The American President”

my_uint32 = SDL_MapRGB(surface-in-question -> format,
my_sdl_color.r,
my_sdl_color.g,
my_sdl_color.b);

… is what you want, I believe.

Make it into a func!

-bill!On Sun, Jul 20, 2003 at 10:38:08PM -0600, Jason Bodnar wrote:

Subject says it all? Since it doesn’t, whats the easiest way to convert an
SDL_Color to Uint32?


bill at newbreedsoftware.com Got kids? Get Tux Paint!
http://newbreedsoftware.com/bill/ http://newbreedsoftware.com/tuxpaint/

That’s what I needed. Thanks!

Subject says it all? Since it doesn’t, whats the easiest way to convert an
SDL_Color to Uint32?

my_uint32 = SDL_MapRGB(surface-in-question -> format,
my_sdl_color.r,
my_sdl_color.g,
my_sdl_color.b);

… is what you want, I believe.

Make it into a func!

-bill!


bill at newbreedsoftware.com Got kids? Get
Tux Paint! http://newbreedsoftware.com/bill/
http://newbreedsoftware.com/tuxpaint/On Sun, 20 Jul 2003 22:33:55 -0700, Bill Kendrick wrote
On Sun, Jul 20, 2003 at 10:38:08PM -0600, Jason Bodnar wrote:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


Jason Bodnar
@Jason_Bodnar
http://www.shakabuku.org

“You want free speech? Let’s see you acknowledge a man whose words make
your blood boil who is standing center stage advocating at the top of
his lungs that which you would spend a lifetime opposing at the top of
yours.” – President Andrew Shephard, “The American President”