ellipse(3alleg4)

πŸ’– ellipse β€” ok bestie, we're drawing OVALS now πŸ’–

So this is a page from the Allegro manual, and it's all about one lil function that goes by ellipse. Buckle up, it's giving geometry but make it cute. πŸ¦‹


✨ NAME ✨

ellipse β€” draws an ellipse. Yeah. That's the whole job. It's from the Allegro game programming library, and it's lowkey one of the most satisfying things you can do with a bitmap. πŸ’…


✨ SYNOPSIS ✨

#include <allegro.h>

void ellipse(BITMAP *bmp, int x, int y, int rx, int ry, int color);

Like, look at that signature. Six whole arguments. She's high maintenance but she delivers. πŸ‘‘


✨ DESCRIPTION ✨

Draws an ellipse with the specified centre and radius.

That's the official tea, and it's exactly what happens β€” no cap. You hand her a bitmap, a centre point, a radius in x, a radius in y, and a color, and she just... puts an oval there. Iconic behaviour honestly. 🌸

Heads up bestie: notice it's rx and ry β€” two separate radii. That's the whole reason this isn't just circle. If rx and ry are equal you've basically got a circle wearing a little disguise. πŸ₯Έ

✨ SEE ALSO ✨

The girlies in the same friend group, fr fr:


That's literally the whole page, babe. Short, sweet, and to the point.

Mwah πŸ’‹ this one came from Allegro, version 4.4.3 β€” the ellipse(3alleg4) page. Go draw something gorgeous with it. πŸŽ€βœ¨