Expand description
PSTools PostScript drawing library.
This crate provides a simple interface to the creation of
PostScript files, which can then be converted into PDF and EPS
using a variety of applications (GhostScript is the typical case). The
majority of functionality is contained in the PSTool struct.
The original motivation for building the library was to display the physical design of integrated circuits, as part of the development of circuit placement and routing tools. With tons of transistors, wires, macro blocks, it’s impossible to understand what’s going on just by looking at the coordinates of elements – you have to draw it, to see what’s going on. Sophisticated graphics packages can be annoying, and machine dependent – PostScript, by contrast, is astonishingly simple, and renders nicely everywhere.
The functionality of the crate is limited – drawing boxes, circles, lines, and text – but sufficient for a lot of quick-and-dirty rendering needs. The crate also builds a stand-alone tool that can read a simple input format, and generate PostScript.
Modules§
Structs§
- PSTool
- The PSTool structure records a series of PostScript events – drawing of
lines, boxes, circles, color changes, text, and so on. A bounding box of the
events is computed when the generate function is called, with the events being
output to the specified file as raw PostScript commands.
By default, line widths are 1 point. A scale factor can be set (with each event scaled by that amount when it is added).
Functions§
- pstools_
version - Returns information string for the installed version.