masked_stretch_blit(3)
β¨ NAME β¨
masked_stretch_blit β scales a rectangular area skipping pixels with the mask color. It's from the Allegro game programming library, bestie, and it's giving "blit but make it fashion" π
π 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 π¦
okay so picture masked_blit(), right? iconic. now imagine that but it can scale images, so the source and destination rectangles do not need to be the same size. that's the whole vibe. stretch it, shrink it, whatever β the mask color pixels get skipped like they're not even invited π«Ά
β οΈ but listen. this routine does not do as much safety checking as the regular masked_blit(). specifically: you must take care not to copy from areas outside the source bitmap. no cap, it will not hold your hand on that one π
Also β and this is important β the source must be a memory bitmap. not optional, not negotiable, that's the rule πΈ
Example, because seeing it is believing:
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);
like?? stretch that hud overlay across the whole screen, main character energy only π
π SEE ALSO π
the besties, the squad, the ones you should also go read:
mwah π that's the page, bestie. this one lives in the Allegro manual, version 4.4.3, and yes the footer is literally just masked_stretch_blit(3) down there keeping it cute. slay, stay masked, stay stretched, periodt πβ¨π
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms