Scroll to navigation

PostScriptView(3U) InterViews Reference Manual PostScriptView(3U)

NAME

PostScriptView, PostScriptViews - base classes for external representation objects that generate PostScript code

SYNOPSIS

#include <Unidraw/Components/psview.h>

DESCRIPTION

PostScriptView is a PreorderView that serves as the abstract base class for external representation objects for emitting PostScript code. A PostScriptView's subject is normally a GraphicComp subclass. PostScriptViews is a subclass of PostScriptView for composite PostScript external views.

POSTSCRIPTVIEW PUBLIC OPERATIONS

PostScriptView redefines Emit to generate header information. Thus you can call Emit on any PostScriptView subclass to generate encapsulated PostScript. Subclasses redefine Definition to generate the PostScript fragment that defines their basic attributes.
Return the subject.

POSTSCRIPTVIEW PROTECTED OPERATIONS

Initialize a PostScriptView, optionally of the given GraphicComp. The constructor is protected to disallow instantiation.

PostScriptView defines numerous protected helper functions to make it

easier for subclasses to generate the PostScript that describes their appearance. The output conforms to the original idraw PostScript format.

The Comments operation generates a standard PostScript comments block. Comments calls the other operations to generate a complete set of comments.
Operations that generate global data, procedures, and idraw-format-specific information.
Operations that generate graphics state information. All output the graphics state attribute that their name suggests, with three exceptions: MinGS outputs a minimal set of graphics state defined by practical graphic objects, namely a brush, foreground and background colors, a pattern, and a transformation matrix. TextGS outputs the graphics state required by textual graphics, including a foreground color, a font, and a transformation matrix. FullGS generates a full set of graphics state.
Get and set the list of all PostScript font names required by the PostScriptView. This set of names appears in a comment near the beginning of the generated output as required by standard PostScript conventions.
Return the bounding box of the graphic for which PostScript is being generated. These values also appear in a standard PostScript comment.
Return the grid spacing, if applicable. Idraw requires this information, and it is buried in a comment.
Begin and end a scope for defining a graphical object.
Generate PostScript procedures containing constant information, such as the character encoding dictionary, string length limit, etc.
Generate PostScript procedures for setting graphics state attributes.
Generate PostScript procedures for instantiating basic graphical objects.
MiscProcs encapsulates calls to the subsequent PostScript procedure-generating operations shown above. DefinitionProc generates PostScript code that declares a procedure. FillProc and StrokeProc fill and stroke the path that a graphical object defines. ShowProc fine-tunes a text object's position. PatternProc creates a PostScript rendition of a pattern. MinMaxProcs define min and max functions. MidpointProc and ThirdpointProc calculate the point midway and one-third the way between two points, respectively. SubsplineProc breaks the vertices defining a spline into smaller pieces to allow approximating the spline with Bezier curves. Finally, StoreVerticesProc stores a set of vertices in arrays.
Convenience functions that return the PSFont and PostScriptView in UList elements, respectively.
Create the appropriate PostScriptView subclass for the given GraphicComp. The relationship between subjects, views, and view categories is encoded in their class identifiers. See classes(3U) for more information on class identifiers and view categories.

POSTSCRIPTVIEWS PUBLIC OPERATIONS

The constructor takes the subject as an optional argument.
For simplicity, PostScriptViews reconciles its state with its subject's by destroying its children and reconstructing them from scratch.

POSTSCRIPTVIEWS PROTECTED OPERATIONS

A convenience function for extracting a UList from an iterator.
DeleteView removes a child and deletes it, while DeleteViews removes and deletes all children.

SEE ALSO

ExternView(3U), GraphicComp(3U), GraphicView(3U), UList(3U), classes(3U), idraw(1I), pspaint(3U)

19 January 1991 Unidraw