al_draw_filled_pieslice(3alleg5)
π NAME π
al_draw_filled_pieslice β bestie, this is the Allegro 5 API function that draws you a whole filled pie slice, and yes it's as iconic as it sounds π
β¨ SYNOPSIS β¨
Okay so first you gotta pull in the primitives header, no cap:
#include <allegro5/allegro_primitives.h>
and then here's the whole function signature, character for character, don't @ me:
void al_draw_filled_pieslice(float cx, float cy, float r, float start_theta,
float delta_theta, ALLEGRO_COLOR color)
π DESCRIPTION π
It draws a filled pieslice β which is literally just a filled circular sector, like a slice of pizza that you actually get to eat πβ¨
Here's the rundown of every parameter, because the way that each one matters:
cx,cyβ the center of the pieslice π« that's your anchor point, the main character of the whole shaperβ the radius of the pieslice π― how far it reaches out from that centercolorβ the color of the pieslice πΈ the vibe, the fit, the whole lewkstart_thetaβ the initial angle from which the pieslice is drawn, measured in radians π this is where your slice startsdelta_thetaβ the angular span of the pieslice, also in radians π and ngl, if you pass a negative number here, it switches direction π plot twist
Heads up bestie: both angles are in radians, not degrees. Do not come crying to me when your slice is 57 times bigger than you wanted π
π¦ SINCE π¦
5.0.6, 5.1.0 β she's been serving since way back, periodt π
π SEE ALSO π
al_draw_pieslice(3alleg5)β the outline version, for when you want the fit without the fill π«Ά
k bye bestie, this page came to you from the Allegro reference manual (that's the al_draw_filled_pieslice(3alleg5) page itself, mwah) β go draw some slay-filled slices, you've got this πβ¨ππ¦
π¦ 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