al_draw_bitmap_region(3alleg5)
β¨ NAME β¨
bestie, this is al_draw_bitmap_region β the Allegro 5 API function that lets you yeet just a lil piece of a bitmap onto the target bitmap π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro.h>
void al_draw_bitmap_region(ALLEGRO_BITMAP *bitmap,
float sx, float sy, float sw, float sh, float dx, float dy, int flags)
π DESCRIPTION π
okay so picture this: you have a whole bitmap, right, and you do NOT want the whole thing. you want a region of it. a lil cropped slice. the moment. and you want that slice drawn onto the target bitmap. that's literally what this does, no cap π¦
here's the breakdown of every single argument, because we don't gatekeep:
sxβ source x πsyβ source y πswβ source width (aka how wide the region you're blitting is)shβ source height (aka how tall the region you're blitting is)dxβ destination xdyβ destination yflagsβ exactly the same as the ones foral_draw_bitmap(3alleg5), periodt
π and fr fr, go read al_draw_bitmap(3alleg5) because it has a whole note about the restrictions on which bitmaps can be drawn where. that's not optional lore, that's required reading, bestie.
π SEE ALSO π
al_draw_bitmap(3alleg5)al_draw_scaled_bitmap(3alleg5)al_draw_rotated_bitmap(3alleg5)al_draw_scaled_rotated_bitmap(3alleg5)
and that's the whole page, gorgeous π this came to you straight from the Allegro reference manual, and yeah, the page is literally named al_draw_bitmap_region(3alleg5) β she's iconic, she's the main character, she's done here πβ¨
π¦ where this page comes from
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms