logo
Free, Micro AI Code Reviews That Run on Git Commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt git-lrc - Free, Micro AI Code Reviews That Run on Git Commit | Product Hunt

stretch_sprite - Stretches a sprite to the destination bitmap. Allegro game programming library.

Description

       Like draw_sprite(), except it can stretch the sprite image to the specified width and height and requires
       the sprite image and destination bitmap to be of the same color depth. Moreover, the sprite image must be
       a memory bitmap. Example:

          /* Create tunnel like effect. */
          for (step = 1; step
             int width = SCREEN_W / step;
             int height = SCREEN_H / step;
             stretch_sprite(screen, image, SCREEN_W / 2 - width / 2,
                            SCREEN_H / 2 - height / 2, width, height);
          }

Name

       stretch_sprite - Stretches a sprite to the destination bitmap. Allegro game programming library.

See Also

draw_sprite(3alleg4), stretch_blit(3alleg4), bitmap_mask_color(3alleg4)

Allegro                                           version 4.4.3                          stretch_sprite(3alleg4)

Synopsis

#include<allegro.h>voidstretch_sprite(BITMAP*bmp,BITMAP*sprite,intx,inty,intw,inth);

See Also