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
- debian bookworm: pslib-dev 0.4.7-1+b1
- debian trixie: pslib-dev 0.4.8-1+b1
- ubuntu jammy: pslib-dev 0.4.7-1
- ubuntu noble: pslib-dev 0.4.7-1build2
- ubuntu questing: pslib-dev 0.4.8-1
- ubuntu resolute: pslib-dev 0.4.8-1build1
- ubuntu stonking: pslib-dev 0.4.8-3 Β· GPL-2.0-or-later OR LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms