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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1004 - (hide annotations)
Thu Mar 1 04:57:31 2007 UTC (12 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 3747 byte(s)
Updated the epydocs, comments and organized codes to ease readability.
1 jongui 943 class Color:
2     """
3 jongui 1004 Constants that define the colors using RGB values.
4 jongui 943
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 jongui 1004 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 jongui 943 YELLOW = [1,1,0]
24 jongui 1004 PINK = [1, 0.0784, 0.4588]
25 jongui 943 ORANGE = [1, 0.2706, 0]
26     PURPLE = [0.5412, 0.1680, 0.8828]
27 jongui 1004 GREY = [0.6602, 0.6602, 0.6602]
28     BROWN = [0.5430, 0.2700, 0.0742]
29 jongui 943
30 jongui 1004
31 jongui 943 class Viewport:
32     """
33 jongui 947 Constants that define the four viewports in a window.
34 jongui 943
35 jongui 1004 @cvar SOUTH_WEST: Constant representing the bottom-left viewport of a
36 jongui 943 window
37 jongui 1004 @cvar NORTH_WEST: Constant representing the upper-left viewport of a
38 jongui 943 window
39 jongui 1004 @cvar NORTH_EAST: Constatnt representing the upper-right viewport of a
40 jongui 943 window
41 jongui 1004 @cvar SOUTH_EAST: Constant representing the bottom-right viewport of a window
42 jongui 943 """
43    
44     SOUTH_WEST = 0
45     NORTH_WEST = 1
46     NORTH_EAST = 2
47     SOUTH_EAST = 3
48    
49 jongui 1004
50 jongui 943 class Source:
51     """
52 jongui 1004 Constants that define the source type.
53 jongui 943
54 jongui 1004 @cvar XML: Constant representing xml as the source type
55     @cvar ESCRIPT: Constant representing escript data objects as source
56 jongui 943 """
57    
58     XML = "xml"
59 jongui 992 ESCRIPT = "escript"
60 jongui 943
61 jongui 1004
62 jongui 943 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 jongui 1004 ONLINE = "online"
76     OFFLINE_JPG = "offline_jpg"
77 jongui 943 OFFLINE_BMP = "offline_bmp"
78     OFFLINE_PNM = "offline_pnm"
79     OFFLINE_PNG = "offline_png"
80     OFFLINE_TIF = "offline_tiff"
81 jongui 1004 OFFLINE_PS = "offline_ps"
82 jongui 943
83 jongui 1004
84 jongui 943 class Arrow:
85     """
86     Constants that define the arrow type.
87    
88 jongui 1004 @cvar TWO_D: Constant representing the two dimensional arrow type
89     @cvar THREE_D: Constant representing the three dimensional arrow type
90 jongui 943 """
91    
92     TWO_D = "2d"
93     THREE_D = "3d"
94    
95 jongui 1004
96 jongui 943 class ColorMode:
97     """
98 jongui 947 Constants that define the color mode used to color the data.
99 jongui 943
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 jongui 1004
108 jongui 943 class WarpMode:
109     """
110     Constants that define the warp mode used to deform the scalar data.
111    
112 jongui 1004 @cvar VECTOR: Constant representing the vector deformation mode
113     @cvar SCALAR: Constant representing the scalar deformation mode
114 jongui 943 """
115    
116     VECTOR = "vector"
117     SCALAR = "scalar"
118    
119 jongui 1004
120 jongui 943 class ImageFormat:
121     """
122     Constants that define the image formats.
123    
124 jongui 947 @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 jongui 1004 @cvar TIF: Constant representing the TIF image format
129 jongui 943 """
130    
131     JPG = "jpg"
132     BMP = "bmp"
133     PNM = "pnm"
134     PNG = "png"
135     TIF = "tif"
136    
137 jongui 1004
138 jongui 943 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"

  ViewVC Help
Powered by ViewVC 1.1.26