al_draw_arc(3alleg5)
β¨ 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<= 0to draw hairline arc. yes bestie,<= 0literally 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
- debian trixie: allegro5-doc 2:5.2.10.1+dfsg-1 Β· Zlib
- ubuntu questing: allegro5-doc 2:5.2.10.1+dfsg-1build1
- ubuntu resolute: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- ubuntu stonking: allegro5-doc 2:5.2.11.3+dfsg-1 Β· Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms