comparison src/breadcrumbs/src/ConstantsFiguresBreadCrumbs.py @ 0:0de566f21448 draft default tip

v2
author sagun98
date Thu, 03 Jun 2021 18:13:32 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0de566f21448
1 """
2 Author: Timothy Tickle
3 Description: Constants for figures.
4 """
5
6 #####################################################################################
7 #Copyright (C) <2012>
8 #
9 #Permission is hereby granted, free of charge, to any person obtaining a copy of
10 #this software and associated documentation files (the "Software"), to deal in the
11 #Software without restriction, including without limitation the rights to use, copy,
12 #modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
13 #and to permit persons to whom the Software is furnished to do so, subject to
14 #the following conditions:
15 #
16 #The above copyright notice and this permission notice shall be included in all copies
17 #or substantial portions of the Software.
18 #
19 #THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
20 #INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
21 #PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
22 #HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23 #OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 #SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 #####################################################################################
26
27 __author__ = "Timothy Tickle"
28 __copyright__ = "Copyright 2012"
29 __credits__ = ["Timothy Tickle"]
30 __license__ = "MIT"
31 __maintainer__ = "Timothy Tickle"
32 __email__ = "ttickle@sph.harvard.edu"
33 __status__ = "Development"
34
35 ##
36 #Holds global configuration constants
37 class ConstantsFiguresBreadCrumbs():
38
39 #Figure oriented
40 c_strBackgroundColorName = "Invisible"
41 c_strBackgroundColor = "255,255,255"
42 c_strBackgroundColorWord = "white"
43 c_strBackgroundColorLetter = "w"
44 c_strDetailsColorWord = "black"
45 c_strDetailsColorLetter = "k"
46
47 #PCOA Markers
48 c_charPCOAPieChart = "o"
49 c_charPCOASquarePieChart = "s"
50 iMarkerSize = 100
51
52 #PCoA defaults
53 c_strPCoALabelDefault = "Label"
54 c_cPCoAColorDefault = 'g'
55 c_cPCoAShapeDefault = 'o'
56 c_cPCoASizeDefault = 20
57
58 #General plotting
59 c_strGridLineColor = "#CCCCCC"
60
61 c_fInverted = False
62 c_dAlpha = 0.5
63
64 def invertColors(self,fInvert):
65 if fInvert==True:
66 #General colors
67 self.c_strBackgroundColor = "0,0,0"
68 self.c_strBackgroundColorTuple = (0,0,0)
69 self.c_strBackgroundColorWord = "black"
70 self.c_strBackgroundColorLetter = "k"
71 self.c_strDetailsColorWord = "white"
72 self.c_strDetailsColorLetter = "w"
73
74 #Invert no select color
75 self.c_charNoSelect = "#000000" # black
76
77 #Record that it is inverted
78 self.c_fInverted = True
79
80 #Alpha looks best at full in inversion
81 self.c_dAlpha = 1.0
82
83 else:
84 #General colors
85 self.c_strBackgroundColor = "255,255,255"
86 self.c_strBackgroundColorTuple = (255,255,255)
87 self.c_strBackgroundColorWord = "white"
88 self.c_strBackgroundColorLetter = "w"
89 self.c_strDetailsColorWord = "black"
90 self.c_strDetailsColorLetter = "k"
91
92 #No select color
93 self.c_charNoSelect = "#FFFFFF" # White
94
95 #Record that it is not inverted
96 self.c_fInverted = False
97
98 #Alpha looks best at full in inversion
99 self.c_dAlpha = 0.5