al_draw_line(3alleg5)

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

✨ 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 <= 0 and it draws hairline lines instead. Not me giving you the skinny option for free ✨

πŸ‘‘ SEE ALSO πŸ‘‘


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