Send SDL mailing list submissions to
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
or, via email, send a message with subject or body 'help' to
You can reach the person managing the list at
When replying, please edit your Subject line so it is more specific
than "Re: Contents of SDL digest..."
1. Re: Copying clipped image to a new surface (Armond Sarkisian)
----------------------------------------------------------------------
Message: 1
Date: Sun, 3 Aug 2008 12:29:40 -0700
Subject: Re: [SDL] Copying clipped image to a new surface
To: "A list for developers using the SDL library. (includes
Content-Type: text/plain; charset="iso-8859-1"
surprisingly i'm still having problems..
SDL_Surface* final = ( NULL );
// copy the clipped image onto the new surface final
_sdl.blitSurface( 0, 0, preImage, final, &clip[0] );
// copy the final image back onto the screen
_sdl.blitSurface( 0, 0, final, screen, NULL );
// update the screen
SDL_UpdateRect( the_screen, 0, 0, 0, 0 );
SDL_FreeSurface( final );
Does this look correct? The image after is not being displayed on the main
screen. I'm sure i'm missing something
Post by Mason WheelerThat's simple enough. Use the new cliprect as a source-rect and blit it
onto the new surface.
----- Original Message ----
Subject: [SDL] Copying clipped image to a new surface
After you clip a surface, is there any way you can "copy" that clipped
portion
onto its own brand new surface?
_______________________________________________
SDL mailing list
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080803/79265a53/attachment.html
------------------------------