PS_BEGIN_TEMPLATE(3)

πŸ’– PS_BEGIN_TEMPLATE πŸ’–

okay bestie, so this is a page from the Library Functions Manual and it's literally called PS_BEGIN_TEMPLATE(3) β€” the (3) means it's a library function, iykyk πŸŽ€


✨ NAME ✨

PS_begin_template β€” starts a new template 🌸


✨ SYNOPSIS ✨

#include <pslib.h>

int PS_begin_template(PSDoc *psdoc, float width, float height)

✨ DESCRIPTION ✨

So you wanna start a new template, and that's exactly what this does. Every template you open has to get closed by PS_end_template(3) β€” no leaving it hanging, bestie, that's not the vibe πŸ’…

Templates are giving macro energy β€” they're similar to macros, except you can place them on a page like they're images. Inside a template you can call any drawing function, go absolutely feral, do whatever art you want 🎨

Once a template has been ended by PS_end_template(3), you can drop it onto a page with PS_place_image(3). And why would you even do this? Because templates are commonly used for repeating objects β€” think page headers β€” so you can minimize the document size. Reuse is the moment, no cap πŸ‘‘

If image reuse is not turned off (and sidenote: since version 0.4.5 of pslib it's always turned on, so like, it's not going off, periodt), then PS_place_image(3) may also be called within a template in order to include eps or raster images. Nested image placement, iconic behaviour honestly πŸ¦‹


✨ RETURN VALUE ✨

It returns an id, and that id is what you use for referencing the template 🫢


✨ SEE ALSO ✨


✨ AUTHOR ✨

This manual page was written by Uwe Steinmann uwe@steinmann.cx. Thank you for your service, king πŸ™‡β€β™€οΈβ­


okay that's the whole page!! this was PS_BEGIN_TEMPLATE(3) from the Library Functions Manual, and if you scrolled all the way down here to the footer you are genuinely the main character of reading manpages πŸ’–βœ¨ slay, go forth and template responsibly πŸŽ€

πŸ“¦ where this page comes from