al_build_transform(3alleg5)

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

πŸ’– al_build_transform πŸ’–

okay bestie, so this one lives in the Allegro 5 API β€” that's the manual we're in, the whole Allegro reference manual vibe β€” and it's literally the shortcut girlies use to build a transformation in one go instead of doing a whole little ritual of calls. slay. ✨


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

void al_build_transform(ALLEGRO_TRANSFORM *trans, float x, float y,
   float sx, float sy, float theta)

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea: this builds a transformation from some parameters you hand it. It's equivalent to calling the transformations in this order: make identity, rotate, scale, translate. Same result, bestie β€” but this method is faster than actually calling those functions one by one. Not me saving you four whole function calls. πŸ’…

πŸŽ€ Parameters πŸŽ€

  • trans β€” the Transformation to alter. she's getting altered, your honor.
  • x, y β€” Translation. (the moving-across-the-screen part πŸ’«)
  • sx, sy β€” Scale. (the make-it-bigger-or-smaller part 🌈)
  • theta β€” Rotation angle, in radians. yes, radians. not degrees. iykyk πŸ“
⚠️ Note: this function was previously documented to be equivalent to a different (and more useful) order of operations: identity, scale, rotate, translate. so if you're reading old docs and going "wait that's not what it says here"β€” yeah. that's why. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie. this was the Allegro reference manual, al_build_transform(3alleg5), and we ate. go build some transforms. periodt. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from