I would like to know how i could blit just a certain section of a surface onto another one using pocketfrog, any suggestions?
- Code:
void Blit( int destX, int destY, const Surface* source, const Rect* srcRect = 0 );
The last parameter is an optional pointer to a Rect that specifies the source rectangle on the source surface. So say you want to blit from the (32,0)-(64,32) rectangle in the source, you would do:
- Code:
Rect rect( 32, 0, 64, 32 );
display->Blit( destX, destY, mySurface, ▭);