al_draw_line(3alleg5)
β¨ NAME β¨
al_draw_line β it's the Allegro 5 API, bestie, and this one function is about to draw you a whole line segment π
πΈ SYNOPSIS πΈ
#include <allegro5/allegro_primitives.h>
void al_draw_line(float x1, float y1, float x2, float y2,
ALLEGRO_COLOR color, float thickness)
π¦ DESCRIPTION π¦
Okay so literally all it does: draws a line segment between two points. That's it, that's the whole vibe. Two dots, one line, main character energy π
Now here's the cast of characters, aka the parameters:
x1,y1,x2,y2β the start and end points of the line. Your from-here-to-there coordinates πcolorβ the color of the line. Slay it however you want πthicknessβ how thick the line is. And listen: pass<= 0and it draws hairline lines instead. Not me giving you the skinny option for free β¨
π SEE ALSO π
al_draw_soft_line(3alleg5)β the sibling, go say hi π«Ά
And that's the whole page, periodt π This was al_draw_line(3alleg5) from the Allegro reference manual β go forth and draw lines, no cap βπ§
π¦ 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