al_draw_filled_pieslice(3alleg5)

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

πŸ’– 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 shape
  • r β€” the radius of the pieslice 🎯 how far it reaches out from that center
  • color β€” the color of the pieslice 🌸 the vibe, the fit, the whole lewk
  • start_theta β€” the initial angle from which the pieslice is drawn, measured in radians πŸ“ this is where your slice starts
  • delta_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 🌟


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