Jump to content

sobreposiçao de imagens

Recommended Posts


tou a fazer um programa em que preciso de sobrepor imagens, mas quando meco o rato na janela em que as imagens estao sobrepostas estas "piscam" ficam intermitentes, como resolvo o problema para que as imagens fiquem estaticas ?

o meu codigo é o seguinte

/* prints an image into the destination surface */

void print_image(SDL_Surface * dest, 
SDL_Surface * image,
int x, int y){

SDL_Rect position;
position.x = x;
position.y = y;

SDL_BlitSurface(image,  NULL,
      dest, &position);

/* condição que sobrepoe as imagens */

if(peso <= 100 && peso >= 0){
print_image(window, barra, 94, 206);
if(peso == 0){
print_image(window, magro, 304,192);
if(peso == 10){
print_image(window, barraVERMELHA, 98, 479);
print_image(window, magro, 304,192);
if(peso == 20){
print_image(window, barraVERMELHA, 98, 449);
print_image(window, magro, 304,192);

Edited by pmg

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.