File: test_postscript.pro

package info (click to toggle)
gnudatalanguage 0.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 15,228 kB
  • ctags: 11,455
  • sloc: cpp: 143,352; makefile: 426; sh: 103; ansic: 44; awk: 18; python: 6
file content (75 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
;
; very basic tests for PostScript output
;
; Alain Coulais 23/08/2011
;
; adding APPLEMAN and SATURN test due to great progress by Sylwester
; GD Oct 2014: updated test to reflect progress in compatibility
;
; -------------------------------------------
;
pro TEST_POSTSCRIPT_APPLEMAN
;
DEFSYSV, '!gdl', exists=isGDL
if isGDL then prefix='GDL_' else prefix='IDL_'
;
SET_PLOT, 'PS'
;
DEVICE, filename=prefix+'appleman.ps', /color
;
plot, findgen(1000), /nodata, $
      xrange=[-10, 650], yrange=[-10,522], /xstyle, /ystyle
;
APPLEMAN, res=res, /NoDisplay
LOADCT, 15
TV, res, 10,10, xsize=640, ysize=512, /DATA
;
DEVICE, /close
;
SET_PLOT, 'X'
;
end
;
; -------------------------------------------
;
pro TEST_POSTSCRIPT_BASIC
;
DEFSYSV, '!gdl', exists=isGDL
if isGDL then prefix='GDL_' else prefix='IDL_'
;
SET_PLOT, 'PS'
;
device, filename=prefix+'output1.ps'
plot, FINDGEN(10)
device, /close
;
device, filename=prefix+'output2.ps', xsize=21, ysize=27
plot, FINDGEN(10)
device, /close
;
device, filename=prefix+'output3.ps', xsize=27, ysize=21
plot, FINDGEN(10)
device, /close
;
device, filename=prefix+'output4_portrait.ps', /portrait, $
  xsize=21, ysize=27, xoffset=10, yoffset=5
plot, FINDGEN(10)
device, /close
;
device, filename=prefix+'output4_land.ps', /landscape, $
  xsize=21, ysize=27, xoffset=10, yoffset=5
plot, FINDGEN(10)
device, /close
;
; back to X11
SET_PLOT, 'X'
;
end

pro TEST_POSTSCRIPT
;
TEST_POSTSCRIPT_BASIC
TEST_POSTSCRIPT_APPLEMAN
;
end