1 | ;------------------------------------------------------------ |
---|
2 | ;------------------------------------------------------------ |
---|
3 | ;------------------------------------------------------------ |
---|
4 | ;+ |
---|
5 | ; |
---|
6 | ; @file_comments |
---|
7 | ; End the drawing if needed when it is a postscript. |
---|
8 | ; |
---|
9 | ; @categories |
---|
10 | ; Utilities, Graphics |
---|
11 | ; |
---|
12 | ; @keyword POST |
---|
13 | ; Make a postscript. Only works if we made one drawing on the page. |
---|
14 | ; If we make several drawing, use \@ps. |
---|
15 | ; |
---|
16 | ; @keyword SMALL {type=vector} |
---|
17 | ; Vector composed of 3 or 4 elements, applied to make a drawing on a |
---|
18 | ; small portion of a page or screen. It delimit the zone where the drawing will be done. |
---|
19 | ; If there is 4 elements: |
---|
20 | ; then is constituted of coordinates (expressed in cm located from the up and |
---|
21 | ; left corner of the page or the window (in portrait like in landscape)) of the bottom |
---|
22 | ; and left corner and of the up and right corner of the drawing zone. |
---|
23 | ; If there is 3 elements: |
---|
24 | ; in this case, we divide the page or the screen in small[0] columns and in small[1] lines |
---|
25 | ; the drawing made in the box numbered small[2]. The numerotation starting up and left by |
---|
26 | ; the number 1 and then, following the writing direction. |
---|
27 | ; By default, we make the largest drawing we can do, conserving the aspect rapport |
---|
28 | ; (except when REMPLI is activated). |
---|
29 | ; |
---|
30 | ; @keyword _EXTRA |
---|
31 | ; Used to pass your keywords |
---|
32 | ; |
---|
33 | ; @uses |
---|
34 | ; common.pro |
---|
35 | ; |
---|
36 | ; @history |
---|
37 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
38 | ; 3/6/1999 |
---|
39 | ; |
---|
40 | ; @version |
---|
41 | ; $Id$ |
---|
42 | ; |
---|
43 | ;- |
---|
44 | ;------------------------------------------------------------ |
---|
45 | ;------------------------------------------------------------ |
---|
46 | ;------------------------------------------------------------ |
---|
47 | PRO terminedessin, POST = post, SMALL = small, _extra = ex |
---|
48 | ;--------------------------------------------------------- |
---|
49 | ; |
---|
50 | compile_opt idl2, strictarrsubs |
---|
51 | ; |
---|
52 | @cm_4ps |
---|
53 | IF NOT keyword_set(key_forgetold) THEN BEGIN |
---|
54 | @updatenew |
---|
55 | @updatekwd |
---|
56 | ENDIF |
---|
57 | ;--------------------------------------------------------- |
---|
58 | if keyword_set(post) then BEGIN |
---|
59 | if keyword_set(small) then $ |
---|
60 | if total(small) NE $ |
---|
61 | (page_margins[2]+page_margins[0]+total(page_size) $ |
---|
62 | -page_margins[1]-page_margins[3]) then return |
---|
63 | closeps |
---|
64 | printps |
---|
65 | endif |
---|
66 | return |
---|
67 | end |
---|