Darwin Help

Back to Index

PostscriptFigure

Class PostscriptFigure - figure given by a postscript file (Darwin or other)

Calling Sequence  PostscriptFigure()
Parameters
NameTypeDescription

psfile string(opt) file name containing the postscript
caption Caption = string(opt) caption to describe the figure
convmeth Convert = string(opt) conversion method
linkas LinkAs = string(opt) path of image source in HTML
newfn PlaceUnder = string(opt) name of converted image file
modif string = string(opt) pattern substitutions for input file
Return Type  PostscriptFigure
Methods HTMLC, LaTeXC, Rand, string, type
Synopsis A PostscriptFigure object is constructed from a postscript file which could be generated by a Darwin Draw command or from some other source, e.g. xfig. This structure is normally held in a Document and is displayed as appropriate (as HTML, latex or a string). If no psfile is given, it is assumed that it comes from a Draw command and hence plotoutfile is used. When this structure is converted to HTML, a .gif or .jpg file has to be made. The default method is 'auto' which will use the UNIX tool 'convert' to automatically create a .jpg file without user interaction. If this does not lead to satisfying results or some modifications (e.g. rotation) has to be performed, the method 'gimp' should be used. This will open the file in Gimp and gives control to the user. Hence Gimp has to be available in the system. The LinkAs option allows linking the file under a different path when converting to HTML. With PlaceUnder a filename for the converted file can be given. This filename also determines the image format (.gif or .jpg). If it is converted to latex, the postscript is converted to encapsulated postscript with ps2eps, which should also be available. Conversion to a string just prints a box with a unix command suitable to display the contents.

The modifiers are a simple mechanism to modify previously created postscript files. Textual substitution will be performed (length issues are ignored, and most of the time they work well). These substitutions should be based on a relatively unique pattern, short patterns that may coincide with other postscript commands are bound to be disastrous.

Examples
> PostscriptFigure( 'PAMgraph.ps', Caption='Score vs PAM');
PostscriptFigure(PAMgraph.ps,Caption = Score vs PAM,Convert = auto,PlaceUnder = 
PAMgraph.jpg,LinkAs = PAMgraph.jpg)
See also Code,   Color,   Copyright,   Document,   HTML,   HyperLink,   Indent,   LastUpdatedBy,   latex,   List,   Paragraph,   print,   Roman,   RunDarwinSession,   screenwidth,   Table,   TT,   View