TICKIT_RENDERBUFFER_NEW(3)

✨ TICKIT_RENDERBUFFER_NEW(3) ✨

okay bestie, so this one lives in the Library Functions Manual, section 3, and it's literally the origin story of every render buffer πŸ’–


🌸 NAME 🌸

tickit_renderbuffer_new β€” create a new render buffer instance πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <tickit.h>

TickitRenderBuffer *tickit_renderbuffer_new(int lines, int cols);

Link with -ltickit.


πŸ’… DESCRIPTION πŸ’…

so tickit_renderbuffer_new() does exactly what it says on the tin: it creates a brand new TickitRenderBuffer instance, sized however you asked. the way you hand it lines and cols? that's the whole vibe. ✨

heads up bestie β€” once it's constructed, the size is fixed. locked in. no take-backs, no glow-ups, no resizing era. 🫢

when it's fresh out of the box it starts out super minimal, like a clean girl aesthetic render buffer:

  • a clipping region that covers the entire area 🌈
  • a zero translation offset
  • no applied masks
  • no stored pen
  • no virtual cursor position πŸ‘‘

and the best part? you can yeet it all the way back to this exact starting state whenever you want by calling tickit_renderbuffer_reset(3). it's giving "factory reset but make it iconic". πŸ’…

also, the reference count of a newly-constructed render buffer instance is one. you can bump it up or down with tickit_renderbuffer_ref(3) and tickit_renderbuffer_unref(3). and when that reference count hits zero? it gets destroyed. no cap. πŸ’€


🌟 RETURN VALUE 🌟

if everything goes right, tickit_renderbuffer_new() returns a pointer to the new instance. slay. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯


okay that's the whole page, bestie πŸ’œ that was tickit_renderbuffer_new(3) from the Library Functions Manual β€” go build something gorgeous with it, mwah πŸŽ€πŸ¦‹βœ¨