PHP Code:
...
// Make a variable to store it.
BITMAP *screen_shot;
...
main()
{
...
// Allocate memory to the variable.
screen_shot = create_bitmap(size_x, size_y);
// Blit the screen part you want to the variable.
// This is presuming you are using "screen" for your screen.
blit(screen, screen_shot, source_x, source_y, 0, 0, size_x, size_y);
...
// Blit it back on to the screen.
blit(screen_shot, screen, 0, 0, dest_x, dest_y, size_x, size_y);
...
}
END_OF_MAIN();
Note that blit allows you to stretch the image by making the sizes not match up with the actual image. This allows you to, say, have the image stretch into shape from a vertical or horizontal line, for instance.
For having transparent color in the image, see draw_sprite() and other functions in the Blitting documentation.
-Justin