.\" Generated by the Allegro makedoc utility .TH stretch_sprite 3alleg4 "version 4.4.2" "Allegro" "Allegro manual" .SH NAME stretch_sprite \- Stretches a sprite to the destination bitmap. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B void stretch_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, int w, int h); .SH 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: .nf /* 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); } .fi .SH SEE ALSO .BR draw_sprite (3alleg4), .BR stretch_blit (3alleg4), .BR bitmap_mask_color (3alleg4)