/[escript]/trunk/pyvisi/py_src/constant.py
ViewVC logotype

Contents of /trunk/pyvisi/py_src/constant.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1168 - (show annotations)
Thu May 24 05:36:42 2007 UTC (12 years, 2 months ago) by jongui
File MIME type: text/x-python
File size: 5551 byte(s)
Pyvisi now has the capability to save the rendered objects as VRML (.wrl) and OpenInventor (.iv) file types. Corresponding tests have also been added.
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 class Viewport:
31 """
32 Constants that define the four viewports in a window.
33
34 @cvar SOUTH_WEST: Constant representing the bottom-left viewport of a
35 window
36 @cvar NORTH_WEST: Constant representing the upper-left viewport of a
37 window
38 @cvar NORTH_EAST: Constatnt representing the upper-right viewport of a
39 window
40 @cvar SOUTH_EAST: Constant representing the bottom-right viewport of a window
41 """
42
43 SOUTH_WEST = 0
44 NORTH_WEST = 1
45 NORTH_EAST = 2
46 SOUTH_EAST = 3
47
48 class Source:
49 """
50 Constants that define the source type.
51
52 @cvar XML: Constant representing xml as the source type
53 @cvar ESCRIPT: Constant representing escript data objects as source
54 """
55
56 XML = "xml"
57 ESCRIPT = "escript"
58
59 class Renderer:
60 """
61 Constants that define the renderer type.
62
63 @cvar ONLINE: Constant representing the online renderer
64 @cvar ONLINE_JPG: Constant representing the JPG online renderer
65 @cvar ONLINE_BMP: Constant representing the BMP online renderer
66 @cvar ONLINE_PNM: Constant representing the PNM online renderer
67 @cvar ONLINE_PNG: Constant representing the PNG online renderer
68 @cvar ONLINE_TIF: Constant representing the TIF online renderer
69 @cvar ONLINE_PS: Constant representing the PS online renderer
70 @cvar ONLINE_VRML: Constant representing the VRML online renderer
71 @cvar ONLINE_IV: Constant representing the OpenInventor online renderer
72
73 @cvar OFFLINE_JPG: Constant representing the JPG offline renderer
74 @cvar OFFLINE_BMP: Constant representing the BMP offline renderer
75 @cvar OFFLINE_PNM: Constant representing the PNM offline renderer
76 @cvar OFFLINE_PNG: Constant representing the PNG offline renderer
77 @cvar OFFLINE_TIF: Constant representing the TIF offline renderer
78 @cvar OFFLINE_PS: Constant representing the PS offline renderer
79 @cvar OFFLINE_VRML: Constant representing the VRML offline renderer
80 @cvar OFFLINE_IV: Constant representing the OpenInventor offline renderer
81
82 @cvar DISPLAY: Constant representing the display renderer
83 @cvar DISPLAY_JPG: Constant representing the JPG display renderer
84 @cvar DISPLAY_BMP: Constant representing the BMP display renderer
85 @cvar DISPLAY_PNM: Constant representing the PNM display renderer
86 @cvar DISPLAY_PNG: Constant representing the PNG display renderer
87 @cvar DISPLAY_TIF: Constant representing the TIF display renderer
88 @cvar DISPLAY_PS: Constant representing the PS display renderer
89 @cvar DISPLAY_VRML: Constant representing the VRML display renderer
90 @cvar DISPLAY_IV: Constant representing the OpenInventor display renderer
91 """
92
93 ONLINE = "online"
94 ONLINE_JPG = "online_jpg"
95 ONLINE_BMP = "online_bmp"
96 ONLINE_PNM = "online_pnm"
97 ONLINE_PNG = "online_png"
98 ONLINE_TIF = "online_tif"
99 ONLINE_PS = "online_ps"
100 ONLINE_VRML = "online_vrml"
101 ONLINE_IV = "online_iv"
102
103 OFFLINE_JPG = "offline_jpg"
104 OFFLINE_BMP = "offline_bmp"
105 OFFLINE_PNM = "offline_pnm"
106 OFFLINE_PNG = "offline_png"
107 OFFLINE_TIF = "offline_tif"
108 OFFLINE_PS = "offline_ps"
109 OFFLINE_VRML = "offline_vrml"
110 OFFLINE_IV = "offline_iv"
111
112 DISPLAY = "display"
113 DISPLAY_JPG = "display_jpg"
114 DISPLAY_BMP = "display_bmp"
115 DISPLAY_PNM = "display_pnm"
116 DISPLAY_PNG = "display_png"
117 DISPLAY_TIF = "display_tif"
118 DISPLAY_PS = "display_ps"
119 DISPLAY_VRML = "display_vrml"
120 DISPLAY_IV = "display_iv"
121
122 class Arrow:
123 """
124 Constants that define the arrow type.
125
126 @cvar TWO_D: Constant representing the two dimensional arrow type
127 @cvar THREE_D: Constant representing the three dimensional arrow type
128 """
129
130 TWO_D = "2d"
131 THREE_D = "3d"
132
133 class ColorMode:
134 """
135 Constants that define the color mode used to color the data.
136
137 @cvar VECTOR: Constant representing the vector color mode
138 @cvar SCALAR: Constant representing the scalar color mode
139 """
140
141 VECTOR = "vector"
142 SCALAR = "scalar"
143
144 class WarpMode:
145 """
146 Constants that define the warp mode used to deform the scalar data.
147
148 @cvar VECTOR: Constant representing the vector deformation mode
149 @cvar SCALAR: Constant representing the scalar deformation mode
150 """
151
152 VECTOR = "vector"
153 SCALAR = "scalar"
154
155 class ImageFormat:
156 """
157 Constants that define the image formats.
158
159 @cvar JPG: Constant representing the JPG image format
160 @cvar BMP: Constant representing the BMP image format
161 @cvar PNM: Constant representing the PNM image format
162 @cvar PNG: Constant representing the PNG image format
163 @cvar TIF: Constant representing the TIF image format
164 """
165
166 JPG = "jpg"
167 BMP = "bmp"
168 PNM = "pnm"
169 PNG = "png"
170 TIF = "tif"
171
172 class Lut:
173 """
174 Constants that define the type of color mapping scheme for the lookup
175 table.
176
177 @cvar COLOR: Constant representing the color scheme
178 @cvar GREY_SCALE: Constant representing the grey scale scheme
179 """
180
181 COLOR = "color"
182 GREY_SCALE = "grey_scale"
183

  ViewVC Help
Powered by ViewVC 1.1.26