polygon(3alleg4)
π NAME π
polygon β draws a filled polygon, bestie. This is from the Allegro manual, aka the Allegro game programming library, and the manual tag is polygon(3alleg4). Periodt. π
π SYNOPSIS π
#include <allegro.h>
void polygon(BITMAP *bmp, int vertices, const int *points, int color);
β¨ DESCRIPTION β¨
Okay so polygon draws a filled polygon with an arbitrary number of corners. No cap, it just does. π¦
You pass the number of vertices and an array containing a series of x, y points β a total of vertices*2 values. The way that math works is lowkey iconic. β¨
Example, fr fr:
int points[12] = { 50, 50, 100, 100, 100, 150,
50, 200, 0, 150, 0, 100 };
...
clear_to_color(screen, makecol(255, 255, 255));
polygon(screen, 6, points, makecol(0, 0, 0));
π SEE ALSO π
That's the whole page, bestie. Go draw something cute. Signed off by Allegro version 4.4.3 and the tag polygon(3alleg4). πβ¨π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms