al_draw_arc(3alleg5)

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

✨ al_draw_arc β€” the Allegro 5 API glow-up ✨

okay bestie, pull up a chair because we're talking about al_draw_arc from the Allegro 5 API (that's the 3alleg5 manual, mwah πŸ’…). it draws an arc. that's the whole gig. but like, beautifully.


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro_primitives.h>

void al_draw_arc(float cx, float cy, float r, float start_theta,
   float delta_theta, ALLEGRO_COLOR color, float thickness)

that's the whole signature, copy it exactly, don't be cute with it 🫢


🌸 DESCRIPTION 🌸

so. it draws an arc. a curved lil swoosh of color. the way that a single function can give you a whole rainbow-adjacent vibe is genuinely iconic. 🌈

here's the tea on the parameters, one by one, no skips:

  • cx, cy β€” Center of the arc. yes both of them, it's a point, it needs two coordinates, we don't make the rules (we do, actually, it's a circle).
  • r β€” Radius of the arc. how far out from the center the curve lives. 🌟
  • color β€” Color of the arc. your moment to shine, pick something gorgeous.
  • start_theta β€” The initial angle from which the arc is calculated in radians. radians!! not degrees!! do not come in here with degrees, i will know. 😭
  • delta_theta β€” Angular span of the arc in radians (pass a negative number to switch direction). so like, if you wanna go the other way around, negative it up, periodt. πŸ”„
  • thickness β€” Thickness of the arc, pass <= 0 to draw hairline arc. yes bestie, <= 0 literally means zero or negative, that's the hairline setting, that's not a bug, that's the feature. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the arc's besties fr fr. πŸ¦‹


and that's the whole page, no notes. this one came straight out of the Allegro reference manual β€” sending you all my love from the al_draw_arc(3alleg5) era, mwah, slay, bye bestie πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from