al_draw_scaled_rotated_bitmap(3alleg5)

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

✨ NAME ✨

al_draw_scaled_rotated_bitmap β€” it's giving Allegro 5 API, bestie πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

void al_draw_scaled_rotated_bitmap(ALLEGRO_BITMAP *bitmap,
   float cx, float cy, float dx, float dy, float xscale, float yscale,
   float angle, int flags)

🌸 DESCRIPTION 🌸

okay so picture al_draw_rotated_bitmap(3alleg5)… but make it extra. This one rotates and scales your bitmap, no cap. Main character energy fr fr πŸ”₯

Here's the tea: the point at cx/cy inside the bitmap gets drawn at dx/dy, and the whole bitmap gets rotated and scaled around that point. So that one pixel is the anchor, the pivot, the moment. πŸ’…

  • cx β€” center x
  • cy β€” center y
  • dx β€” destination x
  • dy β€” destination y
  • xscale β€” how much to scale on the x-axis (e.g. 2 for twice the size)
  • yscale β€” how much to scale on the y-axis
  • angle β€” angle by which to rotate (radians)
  • flags β€” same as for al_draw_bitmap(3alleg5)
heads up bestie 🫢 there's a note on restrictions on which bitmaps can be drawn where β€” go read al_draw_bitmap(3alleg5) for that one, it's important, don't skip it

πŸ¦‹ SEE ALSO πŸ¦‹


okay that's the whole page, you ate it πŸ’– this was the Allegro reference manual entry for al_draw_scaled_rotated_bitmap(3alleg5) β€” go forth and draw your little rotated scaled bitmaps, you're iconic πŸ‘‘βœ¨

πŸ“¦ where this page comes from