1stretch_sprite(3) Allegro manual stretch_sprite(3)
2
3
4
6 stretch_sprite - Stretches a sprite to the destination bitmap. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 void stretch_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, int w,
14 int h);
15
17 Like draw_sprite(), except it can stretch the sprite image to the spec‐
18 ified width and height and requires the sprite image and destination
19 bitmap to be of the same color depth. Moreover, the sprite image must
20 be a memory bitmap. Example:
21
22 /* Create tunnel like effect. */
23 for (step = 1; step
24 int width = SCREEN_W / step;
25 int height = SCREEN_H / step;
26 stretch_sprite(screen, image, SCREEN_W / 2 - width / 2,
27 SCREEN_H / 2 - height / 2, width, height);
28 }
29
30
32 draw_sprite(3), stretch_blit(3), bitmap_mask_color(3)
33
34
35
36Allegro version 4.2.2 stretch_sprite(3)