[SDL] SDL_Surface

Hongli Lai h.lai at chello.nl
Sat Jul 20 02:41:01 PDT 2002


On Wed, 2002-07-17 at 23:18, Mark D'voo wrote:
> ok, i have a large .bmp the i loaded into background and i want to
> just take the part of it and store it in another SDL_Surface called
> tmp.
> how do i do this ? I want to take coordinates starting at (0,0) to
> (50,50)

SDL_Rect rect;

rect.x = 0;
rect.y = 0;
rect.w = 50;
rect.h = 50;
SDL_BlitSurface (image, &rect, tmp, NULL);






More information about the SDL mailing list