Kaya 0.5.2 reference for SDL::blitSurface

List of functions and data types in SDL

Void blitSurface(SDLSurface src, Rect srcrect, SDLSurface dest, Rect destrect)

Arguments

Usage

Copy a rectangle of pixels from one surface to another, for example from a loaded image to the screen.

screen = newSurface(640,480,BPP24,false);
pic = loadSurface("mypic.bmp");
blitSurface(pic,Rect(0,0,40,40),screen,Rect(200,200,px,py));
updateScreen(screen);

If you are copying to the screen surface, remember that these updates will not be displayed until you call updateScreen.

Related

kaya@kayalang.org | Last modified 29 November 2011 | Supported by Durham CompSoc | Powered by Kaya