view:postscript
List of: Scheme Extensions
Subjects: Image Output, Viewing
Contents: Graphic Interaction

Action: Creates a PostScript file of a view.

Filename: gi/gi_scm/view_scm_gi.cxx

Syntax: (view:postscript [filename=plotfile.ps] [color=#f]


[x-size=190 y-size=254] [view=active])

Arg Types: filename string

color boolean

x-size real

y-size real

view view

Returns: view

Description: The optional argument filename specifies a string filename to send the displayed objects. The default filename is plotfile.ps. The optional x-size and y-size specify the dimensions in millimeters of a rectangle into which you want the printed image of the viewport to fit as tightly as possible without distortion. The optional view specifies the view object to send to the filename. If view is not specified, the default is the active view.


The optional argument filename specifies a string for the filename where the displayed objects are saved; the default filename is plotfile.ps. Wireframe images are written in vector graphics format. Temporary text uses PostScript fonts rather than as graphical images. Rendered images are written in raster form.


The argument color specifies whether the view should be drawn in color (#t) or black and white (#f). This always uses a white background for wireframe images. Backgrounds for rendered images are treated as graphics.


The optional arguments x-size and y-size specify the dimensions of the rectangle within which the image will be placed. These arguments need to be positive and represent millimeters. The defaults are 190. mm by 254 mm, which gives a half inch border when printed on 8.5" by 11" paper.


The optional argument view specifies the view object to send to the filename. If view is not specified, the default is the active view.


The scale of a representation is determined by the relationship between the size of the viewport and the view width and height. For example, a default viewport size of 500 by 500 pixels, the default view can be doubled in viewed size by changing the view width and height from 200 to 100 units.


The resolution of the printed image is determined by the relationship between the size of the viewport and the maximum image size, specified when the file view is created.

Limitations: This extension is available on all platforms, but produces results only on NT using OpenGL.

Example: ; view:postscript

; Define a new view.

(define view1 (view:dl))

;; view1

; Create a solid block.

(define block1


(solid:block (position 0 0 0)


(position 35 35 35)))

;; block1

; Create a PostScript view.

(view:postscript "geom.ps" 100 100 view1)

;; #[view 1073761432]
PDF/GI/03SCV.PDF
HTM/DATA/GI/GI/03SCV/0027.HTM