1 |
|
2 |
######################################################## |
3 |
# |
4 |
# Copyright (c) 2003-2008 by University of Queensland |
5 |
# Earth Systems Science Computational Center (ESSCC) |
6 |
# http://www.uq.edu.au/esscc |
7 |
# |
8 |
# Primary Business: Queensland, Australia |
9 |
# Licensed under the Open Software License version 3.0 |
10 |
# http://www.opensource.org/licenses/osl-3.0.php |
11 |
# |
12 |
######################################################## |
13 |
|
14 |
__copyright__="""Copyright (c) 2003-2008 by University of Queensland |
15 |
Earth Systems Science Computational Center (ESSCC) |
16 |
http://www.uq.edu.au/esscc |
17 |
Primary Business: Queensland, Australia""" |
18 |
__license__="""Licensed under the Open Software License version 3.0 |
19 |
http://www.opensource.org/licenses/osl-3.0.php""" |
20 |
__url__="http://www.uq.edu.au/esscc/escript-finley" |
21 |
|
22 |
""" |
23 |
@var __author__: name of author |
24 |
@var __copyright__: copyrights |
25 |
@var __license__: licence agreement |
26 |
@var __url__: url entry point on documentation |
27 |
@var __version__: version |
28 |
@var __date__: date of the version |
29 |
""" |
30 |
|
31 |
__author__="John Ngui, john.ngui@uq.edu.au" |
32 |
|
33 |
|
34 |
class Color: |
35 |
""" |
36 |
Constants that define the colors using RGB values. |
37 |
|
38 |
@cvar RED: Constant representing red color |
39 |
@cvar GREEN: Constant representing green color |
40 |
@cvar BLUE: Constant representing blue color |
41 |
@cvar BLACK: Constant representing black color |
42 |
@cvar WHITE: Constant representing white color |
43 |
@cvar YELLOW: Constant representing yellow color |
44 |
@cvar PINK: Constant represnting pink color |
45 |
@cvar ORANGE: Constant representing orange color |
46 |
@cvar PURPLE: Constant representing purple color |
47 |
@cvar GREY: Constant representing grey color |
48 |
@cvar BROWN: Constant representing brown color |
49 |
""" |
50 |
|
51 |
RED = [1, 0, 0] |
52 |
GREEN = [0, 1, 0] |
53 |
BLUE = [0, 0, 1] |
54 |
BLACK = [0, 0, 0] |
55 |
WHITE = [1, 1, 1] |
56 |
YELLOW = [1,1,0] |
57 |
PINK = [1, 0.0784, 0.4588] |
58 |
ORANGE = [1, 0.2706, 0] |
59 |
PURPLE = [0.5412, 0.1680, 0.8828] |
60 |
GREY = [0.6602, 0.6602, 0.6602] |
61 |
BROWN = [0.5430, 0.2700, 0.0742] |
62 |
|
63 |
class Viewport: |
64 |
""" |
65 |
Constants that define the four viewports in a window. |
66 |
|
67 |
@cvar SOUTH_WEST: Constant representing the bottom-left viewport of a |
68 |
window |
69 |
@cvar NORTH_WEST: Constant representing the upper-left viewport of a |
70 |
window |
71 |
@cvar NORTH_EAST: Constatnt representing the upper-right viewport of a |
72 |
window |
73 |
@cvar SOUTH_EAST: Constant representing the bottom-right viewport of a window |
74 |
""" |
75 |
|
76 |
SOUTH_WEST = 0 |
77 |
NORTH_WEST = 1 |
78 |
NORTH_EAST = 2 |
79 |
SOUTH_EAST = 3 |
80 |
|
81 |
class Source: |
82 |
""" |
83 |
Constants that define the data source type. |
84 |
|
85 |
@cvar XML: Constant representing xml as the source type |
86 |
@cvar ESCRIPT: Constant representing escript data objects the source type |
87 |
""" |
88 |
|
89 |
XML = "xml" |
90 |
ESCRIPT = "escript" |
91 |
|
92 |
class Renderer: |
93 |
""" |
94 |
Constants that define the renderer type. |
95 |
|
96 |
@cvar ONLINE: Constant representing the online renderer |
97 |
@cvar ONLINE_JPG: Constant representing the JPG online renderer |
98 |
@cvar ONLINE_BMP: Constant representing the BMP online renderer |
99 |
@cvar ONLINE_PNM: Constant representing the PNM online renderer |
100 |
@cvar ONLINE_PNG: Constant representing the PNG online renderer |
101 |
@cvar ONLINE_TIF: Constant representing the TIF online renderer |
102 |
@cvar ONLINE_PS: Constant representing the PS online renderer |
103 |
@cvar ONLINE_VRML: Constant representing the VRML online renderer |
104 |
@cvar ONLINE_IV: Constant representing the OpenInventor online renderer |
105 |
|
106 |
@cvar OFFLINE_JPG: Constant representing the JPG offline renderer |
107 |
@cvar OFFLINE_BMP: Constant representing the BMP offline renderer |
108 |
@cvar OFFLINE_PNM: Constant representing the PNM offline renderer |
109 |
@cvar OFFLINE_PNG: Constant representing the PNG offline renderer |
110 |
@cvar OFFLINE_TIF: Constant representing the TIF offline renderer |
111 |
@cvar OFFLINE_PS: Constant representing the PS offline renderer |
112 |
@cvar OFFLINE_VRML: Constant representing the VRML offline renderer |
113 |
@cvar OFFLINE_IV: Constant representing the OpenInventor offline renderer |
114 |
|
115 |
@cvar DISPLAY: Constant representing the display renderer |
116 |
@cvar DISPLAY_JPG: Constant representing the JPG display renderer |
117 |
@cvar DISPLAY_BMP: Constant representing the BMP display renderer |
118 |
@cvar DISPLAY_PNM: Constant representing the PNM display renderer |
119 |
@cvar DISPLAY_PNG: Constant representing the PNG display renderer |
120 |
@cvar DISPLAY_TIF: Constant representing the TIF display renderer |
121 |
@cvar DISPLAY_PS: Constant representing the PS display renderer |
122 |
@cvar DISPLAY_VRML: Constant representing the VRML display renderer |
123 |
@cvar DISPLAY_IV: Constant representing the OpenInventor display renderer |
124 |
""" |
125 |
|
126 |
ONLINE = "online" |
127 |
ONLINE_JPG = "online_jpg" |
128 |
ONLINE_BMP = "online_bmp" |
129 |
ONLINE_PNM = "online_pnm" |
130 |
ONLINE_PNG = "online_png" |
131 |
ONLINE_TIF = "online_tif" |
132 |
ONLINE_PS = "online_ps" |
133 |
ONLINE_VRML = "online_vrml" |
134 |
ONLINE_IV = "online_iv" |
135 |
|
136 |
OFFLINE_JPG = "offline_jpg" |
137 |
OFFLINE_BMP = "offline_bmp" |
138 |
OFFLINE_PNM = "offline_pnm" |
139 |
OFFLINE_PNG = "offline_png" |
140 |
OFFLINE_TIF = "offline_tif" |
141 |
OFFLINE_PS = "offline_ps" |
142 |
OFFLINE_VRML = "offline_vrml" |
143 |
OFFLINE_IV = "offline_iv" |
144 |
|
145 |
DISPLAY = "display" |
146 |
DISPLAY_JPG = "display_jpg" |
147 |
DISPLAY_BMP = "display_bmp" |
148 |
DISPLAY_PNM = "display_pnm" |
149 |
DISPLAY_PNG = "display_png" |
150 |
DISPLAY_TIF = "display_tif" |
151 |
DISPLAY_PS = "display_ps" |
152 |
DISPLAY_VRML = "display_vrml" |
153 |
DISPLAY_IV = "display_iv" |
154 |
|
155 |
class Arrow: |
156 |
""" |
157 |
Constants that define the arrow type. |
158 |
|
159 |
@cvar TWO_D: Constant representing the two dimensional arrow type |
160 |
@cvar THREE_D: Constant representing the three dimensional arrow type |
161 |
""" |
162 |
|
163 |
TWO_D = "2d" |
164 |
THREE_D = "3d" |
165 |
|
166 |
class ColorMode: |
167 |
""" |
168 |
Constants that define the color mode used to color the data. |
169 |
|
170 |
@cvar VECTOR: Constant representing the vector color mode |
171 |
@cvar SCALAR: Constant representing the scalar color mode |
172 |
""" |
173 |
|
174 |
VECTOR = "vector" |
175 |
SCALAR = "scalar" |
176 |
|
177 |
class WarpMode: |
178 |
""" |
179 |
Constants that define the warp mode used to deform the scalar data. |
180 |
|
181 |
@cvar VECTOR: Constant representing the vector deformation mode |
182 |
@cvar SCALAR: Constant representing the scalar deformation mode |
183 |
""" |
184 |
|
185 |
VECTOR = "vector" |
186 |
SCALAR = "scalar" |
187 |
|
188 |
class ImageFormat: |
189 |
""" |
190 |
Constants that define the image formats. |
191 |
|
192 |
@cvar JPG: Constant representing the JPG image format (.jpg) |
193 |
@cvar BMP: Constant representing the BMP image format (.bmp) |
194 |
@cvar PNM: Constant representing the PNM image format (.pnm) |
195 |
@cvar PNG: Constant representing the PNG image format (.png) |
196 |
@cvar TIF: Constant representing the TIF image format (.tif) |
197 |
@cvar PS: Constant representing the PS image format (.ps) |
198 |
""" |
199 |
|
200 |
JPG = "jpg" |
201 |
BMP = "bmp" |
202 |
PNM = "pnm" |
203 |
PNG = "png" |
204 |
TIF = "tif" |
205 |
PS = "ps" |
206 |
|
207 |
class Lut: |
208 |
""" |
209 |
Constants that define the type of mapping scheme for the lookup table. |
210 |
|
211 |
@cvar COLOR: Constant representing the color scheme |
212 |
@cvar GREY_SCALE: Constant representing the grey scale scheme |
213 |
""" |
214 |
|
215 |
COLOR = "color" |
216 |
GREY_SCALE = "grey_scale" |
217 |
|
218 |
class LegendType: |
219 |
""" |
220 |
Constants that define the type of legend for the scalar bar. |
221 |
|
222 |
@cvar SCALAR: Constant representing the legend using scalar data |
223 |
@cvar VECTOR: Constant representing the legend using vector data |
224 |
""" |
225 |
|
226 |
SCALAR = "scalar" |
227 |
VECTOR = "vector" |