ALLEGRO_BITMAP_WRAP(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ ALLEGRO_BITMAP_WRAP ✨

okay bestie, welcome to the Allegro 5 API β€” this page lives in the Allegro reference manual, and it's about ALLEGRO_BITMAP_WRAP, which is genuinely iconic if you're the kind of girl who thinks about texture coordinates at 2am (me, it's me πŸ’…).


🌸 NAME 🌸

ALLEGRO_BITMAP_WRAP β€” the Allegro 5 API, but make it about wrapping πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro5/allegro.h>

typedef enum ALLEGRO_BITMAP_WRAP {

πŸŽ€ DESCRIPTION πŸŽ€

so basically, this enum controls how the pixel color gets determined when you're querying a texture and the texture coordinates are outside the usual bounds. like, you asked for a spot that's off the edge of the texture. what happens next? that's this. no cap 🫢

  • ALLEGRO_BITMAP_WRAP_DEFAULT β€” the default behavior, the one that just shows up with no effort (main character energy fr). This corresponds to ALLEGRO_BITMAP_WRAP_REPEAT when you're using the primitives addon, and ALLEGRO_BITMAP_WRAP_CLAMP otherwise. so it's giving shapeshifter, lowkey πŸ‘‘
  • ALLEGRO_BITMAP_WRAP_REPEAT β€” the texture coordinates get shifted to the opposite edge that they go past. so you walk off the right side and boom, you're back on the left. revolving door vibes 🌈
  • ALLEGRO_BITMAP_WRAP_CLAMP β€” the texture coordinates get clamped to the edges that they go past. you go past the edge? okay bestie, you live on the edge now. held in place, respectfully πŸ“
  • ALLEGRO_BITMAP_WRAP_MIRROR β€” the texture coordinates get mirrored across the edges that they go past. it's the same as repeat except it's flipped, like looking in a mirror. obsessed ✨

heads up babes, these are literally the only four values in the enum β€” nothing else is hiding in here, promise πŸ™ˆ

and that's the whole page, you ate it πŸ’– this was ALLEGRO_BITMAP_WRAP(3alleg5) from the Allegro reference manual β€” go forth and wrap those coordinates, bestie. mwah πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from