al_draw_rectangle(3alleg5)
β¨ al_draw_rectangle β¨
okay bestie, so this one lives in the Allegro 5 API (that's the 3alleg5 manual, iykyk) and it's about to become your new fave little line-drawing icon π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro_primitives.h>
void al_draw_rectangle(float x1, float y1, float x2, float y2,
ALLEGRO_COLOR color, float thickness)
π¦ DESCRIPTION π¦
It draws an outlined rectangle. That's it, that's the whole vibe β just the border, no fill, like eyeliner for your shapes β¨
Now the parameters, because we love a breakdown:
x1,y1,x2,y2β these are the upper left and lower right points of the rectangle. Yes, two corners, that's all it needs, she's low maintenance πcolorβ the color of the rectangle. Go off, pick something cute πthicknessβ the thickness of the lines. And listen: if you pass a value<= 0, you get hairline lines. Hairline!! So thin, so delicate, so demure π§
no cap, <= 0 really does mean hairline β don't come for me, that's just what it does π
π SEE ALSO π
al_draw_filled_rectangle(3alleg5)β for when you want the whole thing filled in, main character energyal_draw_rounded_rectangle(3alleg5)β for when sharp corners are simply not the moment, soft girl era
and that's the tea, bestie π«Ά this page came straight out of the Allegro reference manual, filed under al_draw_rectangle(3alleg5). go draw something iconic, periodt ππΈβ¨
π¦ 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