29 lines · 867 B · Text
RawDownload
= pslib: postscript generation     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; Pslib must first be initialised by calling Init with a loadedBufio module.  Writeimage writes a Postscript file containingthe data within img to f, which should first have been openedfor writing by bufio.  Dpi is a value  specifying  the  pixelwidth of pixels in img; the width (and height) of dpi dots inimg will be one inch when the Postscript is rendered. == source/appl/lib/pslib.b == see ALSObufio(2), draw-image(2) == bugsThe resulting Postscript is really only suitable for  use  asencapsulated  Postscript, as there's no way to set the desti‐nation paper size. There should be many more useful functions in this module.