---
name: "masked_stretch_blit"
section: "3alleg"
platform: "linux"
package: "liballegro-doc"
version: "2:4.2.2-2.2"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/masked_stretch_blit"
---

# masked\_stretch\_blit(3alleg)

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

## NAME

masked\_stretch\_blit - Scales a rectangular area skipping pixels with the mask color. Allegro game programming library.

## SYNOPSIS

**#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);**

## DESCRIPTION

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);
```

## SEE ALSO

[**blit**(3alleg)](/blit/3alleg.md), [**masked\_blit**(3alleg)](/masked_blit/3alleg.md), [**stretch\_blit**(3alleg)](/stretch_blit/3alleg.md), [**stretch\_sprite**(3alleg)](/stretch_sprite/3alleg.md)
