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

Action: Creates an Interleaf image file of a view.

Filename: gi/gi_scm/view_scm_gi.cxx

Syntax: (view:interleaf [filename=plotfile.il] [color]


[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 for the filename where the displayed objects are saved; the default filename is plotfile.il. The argument color specifies whether the view should be drawn in color (#t) or black and white (#f). 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. This always uses a white background for wireframe images. Backgrounds for rendered images are treated as graphics.


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:interleaf

; 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 an Interleaf view 1" by 1"

(define ileaf-view


(view:interleaf "block1.doc" 25.8 25.8 view1))

;; ileaf-view

; 1" at 300 dpi is 1200


; Another example where the size of the view

; and viewport are changed before an output image

; is made.

; Define a new view.

(define view2 (view:dl 100 200))

;; view2

; Create a solid block.

(define block1


(solid:block (position 0 0 0)


(position 35 35 35)))

;; block1

; This queries the current view size and then

; resizes the viewport. Then it makes the

; object appear smaller by changing the width

; and height parameters of the view.

(let ((w (view:width view2)))


(view:set-viewport 0 0 300 300 view2)


(view:set-size (* w 2) (* w 2) view2))

;; #[view 109820984]

; Refresh the view to see the changes

(view:refresh view2)

;; #[view 109829897]

; Create an Interleaf view 1" by 1"

(define ileaf-view2


(view:interleaf "block2.il" 25.8 25.8 view2))

;; ileaf-view2
PDF/GI/03SCV.PDF
HTM/DATA/GI/GI/03SCV/0020.HTM