al_use_transform(3)

πŸ“¦
version 5.2.11.3 Β· 3 versions
, in arch rolling

πŸŽ€ NAME πŸŽ€

al_use_transform(3) β€” straight from the Library Functions Manual, it’s the Allegro 5 API function that sets your drawing transformation, bestie. Periodt. πŸ’…

✨ SYNOPSIS ✨

#include <allegro5/allegro.h>

void al_use_transform(const ALLEGRO_TRANSFORM *trans)

πŸ’– DESCRIPTION πŸ’–

Okay so al_use_transform sets the transformation to be used for the drawing operations on the target bitmap. Lowkey crucial: each bitmap maintains its own transformation. Every drawing operation after this call will be transformed using this transformation. Want the default behaviour back? Call this function with an identity transformation. Slay. πŸ¦‹

This function does nothing if there is no target bitmap. Like, nothing nothing. πŸ’€

The parameter is passed by reference as an optimization to avoid the overhead of stack copying. The reference will not be stored in the Allegro library, so it is safe to pass references to local variables. No cap β€” local ALLEGRO_TRANSFORM is fine. ✨

void setup_my_transformation(void)
{
   ALLEGRO_TRANSFORM transform;
   al_translate_transform(&transform, 5, 10);
   al_use_transform(&transform);
}

πŸ’… Parameters πŸ’…

  • trans β€” Transformation to use 🫢

🌈 SEE ALSO 🌈


πŸ’– cute sign-off: this page is from the Allegro reference manual, all about al_use_transform(3). The original footer didn’t give a date, so I’m not inventing one β€” byeeee πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from
  • arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms