SDL_BlitSurface(), where's the x,y?

Started by
0 comments, last by DAharon 22 years, 2 months ago
I am playing around with SDL, and I can''t get a bitmap to show up anywhere on the screen other than the top left corner. How do you control where on the screen the bitmap will appear?
Advertisement
SDL_Rect dest = {x, y, 0, 0};
SDL_BlitSurface(image, NULL, screen_surface, &dest);

Note that the w and h members of the destination rectangle are ignored by SDL_BlitSurface, and the destination rectangle will probably be modified by SDL_BlitSurface to report how the image got clipped.

This topic is closed to new replies.

Advertisement