summaryrefslogtreecommitdiff
path: root/static/inferno/man2/pslib.2
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/inferno/man2/pslib.2
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/inferno/man2/pslib.2')
-rw-r--r--static/inferno/man2/pslib.246
1 files changed, 46 insertions, 0 deletions
diff --git a/static/inferno/man2/pslib.2 b/static/inferno/man2/pslib.2
new file mode 100644
index 00000000..47d04696
--- /dev/null
+++ b/static/inferno/man2/pslib.2
@@ -0,0 +1,46 @@
+.TH PSLIB 2
+.SH NAME
+pslib - postscript generation
+.SH SYNOPSIS
+.EX
+include "pslib.m";
+pslib := load Pslib Pslib->PATH;
+
+init: fn(bufio: Bufio);
+writeimage: fn(f: ref Bufio->Iobuf,
+ img: ref Draw->Image, dpi: int): string;
+.EE
+.SH DESCRIPTION
+.B Pslib
+must first be initialised by calling
+.B Init
+with a loaded Bufio module.
+.B Writeimage
+writes a Postscript file containing the data within
+.I img
+to
+.IR f ,
+which should first have been opened for writing
+by
+.IR bufio .
+.I Dpi
+is a value specifying the pixel width of pixels in
+.IR img ;
+the width (and height) of
+.I dpi
+dots in
+.I img
+will be one inch when the Postscript is
+rendered.
+.SH SOURCE
+.B /appl/lib/pslib.b
+.SH SEE ALSO
+.IR bufio (2),
+.IR draw-image (2)
+.SH BUGS
+The resulting Postscript is really only suitable for
+use as encapsulated Postscript, as there's no way
+to set the destination paper size.
+.PP
+There should be many more useful functions
+in this module.