File: test_colors.pro

package info (click to toggle)
gnudatalanguage 1.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,832 kB
  • sloc: cpp: 198,435; ansic: 47,740; sh: 691; python: 474; makefile: 149; xml: 69; f90: 28
file content (58 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download | duplicates (3)
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
;
; AC le 16 Mai 2006
; Debugged with GDL team 13/10/2006
; Postscript tests are move to another program
;
pro TEST_COLORS, verbose=verbose, background=background, $
                 test=test, no_exit=no_exit
;
print, 'This program quickly checks basic colors in DEVICE, /decomposed mode'
;
; We switch to the good color enviromment
; http://fermi.jhuapl.edu/s1r/idl/s1rlib/idl_color/
;
DEVICE, get_decomposed=old_decomposed
if NOT(old_decomposed) then begin
   print, 'We switch to DEVICE, /decomposed'
   DEVICE, decompose=1
endif
;
; begin of the plots !
;
plot,[1,0], background=background
;
xxo=0.025
;
; somes basic colors
;
xx=0.1
oplot,[xx,xx],color='ff'x
xyouts, xx+xxo, xx+xxo, 'RED expected', color='ff'x
;
xx=0.2
oplot,[xx,xx],color='ff00'x
xyouts, xx+xxo, xx+xxo, 'GREEN expected', color='ff00'x
;
xx=0.3
oplot,[xx,xx],color='ff0000'x
xyouts, xx+xxo, xx+xxo, 'BLUE expected', color='ff0000'x
;
xx=0.4
oplot,[xx,xx],color='ffff00'x
xyouts, xx+xxo, xx+xxo, 'CYAN expected', color='ffff00'x
;
xx=0.5
oplot,[xx,xx],color='ff00ff'x
xyouts, xx+xxo, xx+xxo, 'MAGENTA expected', color='ff00ff'x
;
xx=0.6
oplot,[xx,xx],color='00ffff'x
xyouts, xx+xxo, xx+xxo, 'YELLOW expected', color='00ffff'x
;
; we switch back to previous Device mode
DEVICE, decomposed=old_decomposed
;
if KEYWORD_SET(no_exit) then STOP
if KEYWORD_SET(test) then STOP
;
end