1 |
class Color: |
2 |
""" |
3 |
Constants that define 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 |
Constant that define the source data type. |
51 |
|
52 |
@cvar XML: Constant representing the xml source data type |
53 |
@cvar ESCRIPT: Constant representing the 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 OFFLINE_JPG: Constant representing the JPG offline renderer |
65 |
@cvar OFFLINE_BMP: Constant representing the BMP offline renderer |
66 |
@cvar OFFLINE_PNM: Constant representing the PNM offline renderer |
67 |
@cvar OFFLINE_PNG: Constant representing the PNG offline renderer |
68 |
@cvar OFFLINE_TIF: Constant representing the TIF offline renderer |
69 |
@cvar OFFLINE_PS: Constant representing the PS offline renderer |
70 |
""" |
71 |
|
72 |
ONLINE = "online" |
73 |
OFFLINE_JPG = "offline_jpeg" |
74 |
OFFLINE_BMP = "offline_bmp" |
75 |
OFFLINE_PNM = "offline_pnm" |
76 |
OFFLINE_PNG = "offline_png" |
77 |
OFFLINE_TIF = "offline_tiff" |
78 |
OFFLINE_PS = "offline_ps" |
79 |
|
80 |
class Arrow: |
81 |
""" |
82 |
Constants that define the arrow type. |
83 |
|
84 |
@cvar TWO_D: Constant representing the two dimensional arrow |
85 |
@cvar THREE_D: Constant representing the three dimensional arrow |
86 |
""" |
87 |
|
88 |
TWO_D = "2d" |
89 |
THREE_D = "3d" |
90 |
|
91 |
class ColorMode: |
92 |
""" |
93 |
Constants that define the color mode used to color the data. |
94 |
|
95 |
@cvar VECTOR: Constant representing the vector color mode |
96 |
@cvar SCALAR: Constant representing the scalar color mode |
97 |
""" |
98 |
|
99 |
VECTOR = "vector" |
100 |
SCALAR = "scalar" |
101 |
|
102 |
class WarpMode: |
103 |
""" |
104 |
Constants that define the warp mode used to deform the scalar data. |
105 |
|
106 |
@cvar VECTOR: Constant representing the vector deform mode |
107 |
@cvar SCALAR: Constant representing the scalar deform mode |
108 |
""" |
109 |
|
110 |
VECTOR = "vector" |
111 |
SCALAR = "scalar" |
112 |
|
113 |
class ImageFormat: |
114 |
""" |
115 |
Constants that define the image formats. |
116 |
|
117 |
@cvar JPG: Constant representing the JPG image format |
118 |
@cvar BMP: Constant representing the BMP image format |
119 |
@cvar PNM: Constant representing the PNM image format |
120 |
@cvar PNG: Constant representing the PNG image format |
121 |
@cvar TIF: Constant representing the TIF iamge format |
122 |
""" |
123 |
|
124 |
JPG = "jpg" |
125 |
BMP = "bmp" |
126 |
PNM = "pnm" |
127 |
PNG = "png" |
128 |
TIF = "tif" |
129 |
|
130 |
class Lut: |
131 |
""" |
132 |
Constants that define the type of color mapping scheme for the lookup |
133 |
table. |
134 |
|
135 |
@cvar COLOR: Constant representing the color scheme |
136 |
@cvar GREY_SCALE: Constant representing the grey scale scheme |
137 |
""" |
138 |
|
139 |
COLOR = "color" |
140 |
GREY_SCALE = "grey_scale" |