TICKIT_RENDERBUFFER_SAVE(3)
β¨ TICKIT_RENDERBUFFER_SAVE(3) β¨ β Library Functions Manual, bestie edition π
okay so this is the page for the tickit_renderbuffer_save family of functions, from the Library Functions Manual, and no cap it's giving "save your game before the boss fight" energy. Let's get into it π
πΈ NAME πΈ
tickit_renderbuffer_save, tickit_renderbuffer_restore, tickit_renderbuffer_savepen β save and restore auxiliary state
like... it's the undo button but make it β¨deliberateβ¨
π¦ SYNOPSIS π¦
#include <tickit.h>
void tickit_renderbuffer_save(TickitRenderBuffer *rb);
void tickit_renderbuffer_restore(TickitRenderBuffer *rb);
void tickit_renderbuffer_savepen(TickitRenderBuffer *rb);
Link with -ltickit.
bestie do NOT forget the -ltickit at link time, the linker will simply not know her and it will be embarrassing π
π DESCRIPTION π
tickit_renderbuffer_save() pushes a new entry onto the buffer's saved state stack. So basically it goes "okay, snapshotting the current values of the auxiliary state right now" β and later you can bring those values back with tickit_renderbuffer_restore(). it's literally a save point. iconic behaviour fr fr.
tickit_renderbuffer_restore() pops the most recent entry off that saved state stack and reverts the auxiliary state values right back to whatever was saved. the way it just... rewinds. obsessed. π
tickit_renderbuffer_savepen() is the lowkey special one β it pushes a new entry onto the stack containing just the current pen value. so when it gets restored, it only restores the pen, and the other attributes stay completely unaffected. pen-only, no notes, main character energy. β¨
π AUXILIARY STATE π
here's exactly what these functions save and restore, the whole vibe check:
- the virtual cursor position
- the translation offset
- the clipping rectangle
- the current pen
- the set of masked regions
the pending content is not part of the state stack, okay? like she's not invited to this party.
the whole point β the intended use β is that the state stack helps you implement recursive drawing operations inside your application, by splitting it into separate independent areas, so you can save and restore the state between component parts. it's giving nesting, it's giving componentised rendering, it's giving structure. π
π RETURN VALUE π
None of these functions return a value. not a single one. they just do the thing and leave. periodt. π
π SEE ALSO π
and that's the whole page, bestie π«Ά go forth and save your state before you draw anything recursive, your future self will thank you π
sign-off cuteness: this was page TICKIT_RENDERBUFFER_SAVE(3) from the Library Functions Manual β mwah, slay, stay hydrated, and remember to pop that stack when you're done β¨
π¦ where this page comes from
- alpine 3.24: libtickit-doc 0.4.6-r0 Β· MIT
- debian bookworm: libtickit-dev 0.4.3-1 Β· MIT
- debian trixie: libtickit-dev 0.4.3-2 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 43: libtickit-devel 0.4.5-2.fc43 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- fedora 44: libtickit-devel 0.4.5-3.fc44 Β· MIT
- nixos 26.05: libtickit 0.4.5
- nixpkgs unstable: libtickit 0.4.6
- ubuntu jammy: libtickit-dev 0.4.1-1 Β· MIT
- ubuntu noble: libtickit-dev 0.4.3-1.1build1 Β· MIT
- ubuntu questing: libtickit-dev 0.4.3-2
- ubuntu resolute: libtickit-dev 0.4.3-2build1 Β· MIT
- ubuntu stonking: libtickit-dev 0.4.3-2build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms