masked_stretch_blit(3alleg)

masked_stretch_blit3alleg

Scales a rectangular area skipping pixels with the mask color. allegro game programming library.

Usage

#include <allegro.h>

void masked_stretch_blit(BITMAP *source, BITMAP *dest, int source_x, source_y, source_w, source_h, int dest_x, dest_y, dest_w, dest_h);

Overview

Like masked_blit(), except it can scale images (so the source and destination rectangles don't need to be the same size). This routine doesn't do as much safety checking as the regular masked_blit(): in particular you must take care not to copy from areas outside the source bitmap. Moreover, the source must be a memory bitmap. Example:

   BITMAP *hud_overlay;
   ...
   /* Stretch hud overlay over the screen. */
   masked_stretch_blit(hud_overlay, screen, 0, 0,
                       hud_overlay->w, hud_overlay->h,
                       0, 0, SCREEN_W, SCREEN_H);

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.