1 |
class Color: |
2 |
""" |
3 |
Constants that define the colors using RGB values. |
4 |
|
5 |
@cvar RED: Constant representing red color |
6 |
@cvar GREEN: Constant representing green color |
7 |
@cvar BLUE: Constant representing blue color |
8 |
@cvar BLACK: Constant representing black color |
9 |
@cvar WHITE: Constant representing white color |
10 |
@cvar YELLOW: Constant representing yellow color |
11 |
@cvar PINK: Constant represnting pink color |
12 |
@cvar ORANGE: Constant representing orange color |
13 |
@cvar PURPLE: Constant representing purple color |
14 |
@cvar GREY: Constant representing grey color |
15 |
@cvar BROWN: Constant representing brown color |
16 |
""" |
17 |
|
18 |
RED = [1, 0, 0] |
19 |
GREEN = [0, 1, 0] |
20 |
BLUE = [0, 0, 1] |
21 |
BLACK = [0, 0, 0] |
22 |
WHITE = [1, 1, 1] |
23 |
YELLOW = [1,1,0] |
24 |
PINK = [1, 0.0784, 0.4588] |
25 |
ORANGE = [1, 0.2706, 0] |
26 |
PURPLE = [0.5412, 0.1680, 0.8828] |
27 |
GREY = [0.6602, 0.6602, 0.6602] |
28 |
BROWN = [0.5430, 0.2700, 0.0742] |
29 |
|
30 |
|
31 |
class Viewport: |
32 |
""" |
33 |
Constants that define the four viewports in a window. |
34 |
|
35 |
@cvar SOUTH_WEST: Constant representing the bottom-left viewport of a |
36 |
window |
37 |
@cvar NORTH_WEST: Constant representing the upper-left viewport of a |
38 |
window |
39 |
@cvar NORTH_EAST: Constatnt representing the upper-right viewport of a |
40 |
window |
41 |
@cvar SOUTH_EAST: Constant representing the bottom-right viewport of a window |
42 |
""" |
43 |
|
44 |
SOUTH_WEST = 0 |
45 |
NORTH_WEST = 1 |
46 |
NORTH_EAST = 2 |
47 |
SOUTH_EAST = 3 |
48 |
|
49 |
|
50 |
class Source: |
51 |
""" |
52 |
Constants that define the source type. |
53 |
|
54 |
@cvar XML: Constant representing xml as the source type |
55 |
@cvar ESCRIPT: Constant representing escript data objects as source |
56 |
""" |
57 |
|
58 |
XML = "xml" |
59 |
ESCRIPT = "escript" |
60 |
|
61 |
|
62 |
class Renderer: |
63 |
""" |
64 |
Constants that define the renderer type. |
65 |
|
66 |
@cvar ONLINE: Constant representing the online renderer |
67 |
@cvar OFFLINE_JPG: Constant representing the JPG offline renderer |
68 |
@cvar OFFLINE_BMP: Constant representing the BMP offline renderer |
69 |
@cvar OFFLINE_PNM: Constant representing the PNM offline renderer |
70 |
@cvar OFFLINE_PNG: Constant representing the PNG offline renderer |
71 |
@cvar OFFLINE_TIF: Constant representing the TIF offline renderer |
72 |
@cvar OFFLINE_PS: Constant representing the PS offline renderer |
73 |
""" |
74 |
|
75 |
ONLINE = "online" |
76 |
ONLINE_JPG = "online_jpg" |
77 |
ONLINE_BMP = "online_bmp" |
78 |
ONLINE_PNM = "online_pnm" |
79 |
ONLINE_PNG = "online_png" |
80 |
ONLINE_TIF = "online_tif" |
81 |
ONLINE_PS = "online_ps" |
82 |
|
83 |
OFFLINE_JPG = "offline_jpg" |
84 |
OFFLINE_BMP = "offline_bmp" |
85 |
OFFLINE_PNM = "offline_pnm" |
86 |
OFFLINE_PNG = "offline_png" |
87 |
OFFLINE_TIF = "offline_tif" |
88 |
OFFLINE_PS = "offline_ps" |
89 |
|
90 |
DISPLAY = "display" |
91 |
DISPLAY_JPG = "display_jpg" |
92 |
DISPLAY_BMP = "display_bmp" |
93 |
DISPLAY_PNM = "display_pnm" |
94 |
DISPLAY_PNG = "display_png" |
95 |
DISPLAY_TIF = "display_tif" |
96 |
DISPLAY_PS = "display_ps" |
97 |
|
98 |
|
99 |
|
100 |
class Arrow: |
101 |
""" |
102 |
Constants that define the arrow type. |
103 |
|
104 |
@cvar TWO_D: Constant representing the two dimensional arrow type |
105 |
@cvar THREE_D: Constant representing the three dimensional arrow type |
106 |
""" |
107 |
|
108 |
TWO_D = "2d" |
109 |
THREE_D = "3d" |
110 |
|
111 |
|
112 |
class ColorMode: |
113 |
""" |
114 |
Constants that define the color mode used to color the data. |
115 |
|
116 |
@cvar VECTOR: Constant representing the vector color mode |
117 |
@cvar SCALAR: Constant representing the scalar color mode |
118 |
""" |
119 |
|
120 |
VECTOR = "vector" |
121 |
SCALAR = "scalar" |
122 |
|
123 |
|
124 |
class WarpMode: |
125 |
""" |
126 |
Constants that define the warp mode used to deform the scalar data. |
127 |
|
128 |
@cvar VECTOR: Constant representing the vector deformation mode |
129 |
@cvar SCALAR: Constant representing the scalar deformation mode |
130 |
""" |
131 |
|
132 |
VECTOR = "vector" |
133 |
SCALAR = "scalar" |
134 |
|
135 |
|
136 |
class ImageFormat: |
137 |
""" |
138 |
Constants that define the image formats. |
139 |
|
140 |
@cvar JPG: Constant representing the JPG image format |
141 |
@cvar BMP: Constant representing the BMP image format |
142 |
@cvar PNM: Constant representing the PNM image format |
143 |
@cvar PNG: Constant representing the PNG image format |
144 |
@cvar TIF: Constant representing the TIF image format |
145 |
""" |
146 |
|
147 |
JPG = "jpg" |
148 |
BMP = "bmp" |
149 |
PNM = "pnm" |
150 |
PNG = "png" |
151 |
TIF = "tif" |
152 |
|
153 |
|
154 |
class Lut: |
155 |
""" |
156 |
Constants that define the type of color mapping scheme for the lookup |
157 |
table. |
158 |
|
159 |
@cvar COLOR: Constant representing the color scheme |
160 |
@cvar GREY_SCALE: Constant representing the grey scale scheme |
161 |
""" |
162 |
|
163 |
COLOR = "color" |
164 |
GREY_SCALE = "grey_scale" |
165 |
|
166 |
class VizType: |
167 |
""" |
168 |
Constants that define the visualization types. |
169 |
|
170 |
@cvar VELOCITY: Constant representing the velocity |
171 |
@cvar CONTOUR: Constant representing the contour |
172 |
@cvar MAP: Constant representing the surface map |
173 |
@cvar ELLIPSOID: Constant representing the ellipsoid |
174 |
@cvar CARPET: Constant representing the carpet |
175 |
@cvar STREAMLINE: Constant representing the streamline |
176 |
""" |
177 |
|
178 |
VELOCITY = "Velocity" |
179 |
CONTOUR = "Contour" |
180 |
MAP = "Map" |
181 |
ELLIPSOID = "Ellipsoid" |
182 |
CARPET = "Carpet" |
183 |
STREAMLINE = "Streamline" |