How can I copy a surface or a portion of a surface to a new surface?
Well, one thing you can do is blit from the original surface to a new
surface (SDL_BlitSurface: http://sdldoc.csn.ul.ie/sdlblitsurface.php )
If you want to duplicate a surface and convert its format to the display
format you can also use SDL_DisplayFormat:
http://sdldoc.csn.ul.ie/sdldisplayformat.phpOn Fri, 2002-03-29 at 08:25, therealman11 wrote:
How can I copy a surface or a portion of a surface to a new surface?
–
Sam “Criswell” Hart <@Sam_Hart> AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Tux4Kids: < http://www.tux4kids.org/ >
How can I copy a surface or a portion of a surface to a new surface?
SDL_BlitSurface(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst,
SDL_Rect *dstrect)
is your friend :)–
Qui e’ Jack Burton, del Pork-Chop Express,
che parla a chiunque sia in ascolto.
Yeah, but I want to copy just a portion of a surface onto a new
surface with an alpha channel. When I use SDL_CreateRGBSurface()
and an amask of 0xff000000 the surface blits completely
transparent.
— In libsdl at y…, Samuel Hart wrote:
How can I copy a surface or a portion of a surface to a new
surface?Well, one thing you can do is blit from the original surface to
a new
surface (SDL_BlitSurface:
http://sdldoc.csn.ul.ie/sdlblitsurface.php )If you want to duplicate a surface and convert its format to the
display> On Fri, 2002-03-29 at 08:25, therealman11 wrote:
format you can also use SDL_DisplayFormat:
http://sdldoc.csn.ul.ie/sdldisplayformat.php–
Sam “Criswell” Hart AIM, Yahoo!:
Homepage: < http://www.geekcomix.com/snh/ >
PGP Info: < http://www.geekcomix.com/snh/contact/ >
Tux4Kids: < http://www.tux4kids.org/ >
SDL mailing list
SDL at l…
http://www.libsdl.org/mailman/listinfo/sdl