ALLEGRO_LINE_CAP(3alleg5)

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

πŸ’– ALLEGRO_LINE_CAP πŸ’–

okay bestie, sit down, hydrate, and let me tell you about ALLEGRO_LINE_CAP from the Allegro reference manual. this is a 3alleg5 page, it's giving ✨primitives✨, and it is genuinely so much cuter than it sounds. i promise. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro5/allegro_primitives.h>

typedef enum ALLEGRO_LINE_CAP

that's it. that's the whole vibe. a lil enum, a lil include, and suddenly your lines have fashion. πŸ’…


✨ DESCRIPTION ✨

so. ALLEGRO_LINE_CAP is the enum that decides what happens at the ends of your lines β€” like, the little hat your line wears at each tip. no cap. (okay well, actually. cap. that's literally the word. 😭)

here's the whole lineup, and yes you need all of them:

  • ALLEGRO_LINE_CAP_NONE
  • ALLEGRO_LINE_CAP_SQUARE
  • ALLEGRO_LINE_CAP_ROUND
  • ALLEGRO_LINE_CAP_TRIANGLE
  • ALLEGRO_LINE_CAP_CLOSED β€” [IMAGE: ALLEGRO_LINE_CAP styles] ALLEGRO_LINE_CAP styles
πŸ–ΌοΈ there's a picture, and bestie, see the picture for the difference. it's right there. it's showing you. it's the whole point. look at it. πŸ‘€

πŸ¦‹ the CLOSED situation (it's different, and that's on purpose)

okay so this is the part where i need you to lock in, because ALLEGRO_LINE_CAP_CLOSED is not like the other girls πŸ’… β€” it's literally different from the others.

what it does: it causes the polygon to have no caps. at all. none. bye.

and since there's nothing capping it, the ALLEGRO_LINE_JOIN(3alleg5) style is what steps up and determines how the vertex looks. so yeah β€” cap says nothing, join says everything. main character energy, honestly. πŸ‘‘


⭐ SINCE ⭐

5.1.0

(so it's been iconic for a minute. vintage, even. πŸŽ€)


🌈 SEE ALSO 🌈


that's the page, bestie!! go cap some lines, go make polygons, go be the artist you were born to be 🫢✨

~ with love, from the Allegro reference manual, ALLEGRO_LINE_CAP(3alleg5) ~ πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from