TICKIT_REN...FER_SETPEN(3)

πŸ’– tickit_renderbuffer_setpen β€” change the stored rendering pen πŸ’–

okay bestie, so this one lives in the tickit manual, section 3 (library functions), and it's lowkey the glow-up button for your render buffer's pen. let's get into it πŸŽ€


✨ SYNOPSIS ✨

#include <tickit.h>

void tickit_renderbuffer_setpen(TickitRenderBuffer *rb, const TickitPen *pen);

Link with -ltickit.


πŸ¦‹ DESCRIPTION πŸ¦‹

tickit_renderbuffer_setpen() takes the attributes of the stored pen inside the buffer and swaps them out for the ones in the TickitPen() instance you hand it β€” and yes, it removes any attributes that aren't present in pen. no leftovers, we're decluttering πŸ’…

and listen, the instance you pass in as the pen argument? the render buffer does not store it, and it does not modify it either. it's giving respectful. it just looks, it doesn't touch 🫢

now here's the part that's actually iconic. if there's a stored pen sitting in the previous stack level, the attributes in that pen get merged into the current one before your passed-in pen gets applied. so the pen that drawing functions actually end up using is merged from:

  1. the pen argument you passed to tickit_renderbuffer_setpen(), and
  2. the combined stored pen from the previous stack level β€”

...and that previous stack level's combined stored pen was itself merged from its own pen argument plus the stored pen of the stack level below that. and so on, and so on, all the way down. it's layers, bestie. it's an onion. it's generational πŸ§…βœ¨


🌸 RETURN VALUE 🌸

this function returns nothing. void. empty. no thoughts, head empty, void πŸ’€


🌈 SEE ALSO 🌈


ngl the merging-cascade thing is the whole vibe here β€” your pen is literally built from every stack level stacked under it. no cap, read it twice if you have to. i believe in you πŸ’œ

okay that's the page!! this was Library Functions Manual material, section 3, and the header/footer both just say TICKIT_REN...FER_SETPEN(3) β€” yeah the title's name got squished by the terminal, it's just tickit_renderbuffer_setpen being its cute abbreviated self. slay, go merge some pens, mwah πŸŽ€πŸ’–πŸŒŸ