/[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 1029 - (show annotations)
Wed Mar 14 05:01:13 2007 UTC (12 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 3891 byte(s)
Fixed problems in relation to updates propagating when multiple files/sources are read.
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 OFFLINE_JPG = "offline_jpg"
77 OFFLINE_BMP = "offline_bmp"
78 OFFLINE_PNM = "offline_pnm"
79 OFFLINE_PNG = "offline_png"
80 OFFLINE_TIF = "offline_tiff"
81 OFFLINE_PS = "offline_ps"
82
83
84 class Arrow:
85 """
86 Constants that define the arrow type.
87
88 @cvar TWO_D: Constant representing the two dimensional arrow type
89 @cvar THREE_D: Constant representing the three dimensional arrow type
90 """
91
92 TWO_D = "2d"
93 THREE_D = "3d"
94
95
96 class ColorMode:
97 """
98 Constants that define the color mode used to color the data.
99
100 @cvar VECTOR: Constant representing the vector color mode
101 @cvar SCALAR: Constant representing the scalar color mode
102 """
103
104 VECTOR = "vector"
105 SCALAR = "scalar"
106
107
108 class WarpMode:
109 """
110 Constants that define the warp mode used to deform the scalar data.
111
112 @cvar VECTOR: Constant representing the vector deformation mode
113 @cvar SCALAR: Constant representing the scalar deformation mode
114 """
115
116 VECTOR = "vector"
117 SCALAR = "scalar"
118
119
120 class ImageFormat:
121 """
122 Constants that define the image formats.
123
124 @cvar JPG: Constant representing the JPG image format
125 @cvar BMP: Constant representing the BMP image format
126 @cvar PNM: Constant representing the PNM image format
127 @cvar PNG: Constant representing the PNG image format
128 @cvar TIF: Constant representing the TIF image format
129 """
130
131 JPG = "jpg"
132 BMP = "bmp"
133 PNM = "pnm"
134 PNG = "png"
135 TIF = "tif"
136
137
138 class Lut:
139 """
140 Constants that define the type of color mapping scheme for the lookup
141 table.
142
143 @cvar COLOR: Constant representing the color scheme
144 @cvar GREY_SCALE: Constant representing the grey scale scheme
145 """
146
147 COLOR = "color"
148 GREY_SCALE = "grey_scale"
149
150 class VizType:
151 VELOCITY = "Velocity"
152 CONTOUR = "Contour"
153 MAP = "Map"
154 ELLIPSOID = "Ellipsoid"
155 CARPET = "Carpet"
156 STREAMLINE = "Streamline"

  ViewVC Help
Powered by ViewVC 1.1.26