summaryrefslogtreecommitdiffstats
path: root/unit_trace/viz/format.py
diff options
context:
space:
mode:
authorGary Bressler <garybressler@nc.rr.com>2010-04-08 17:11:08 -0400
committerGary Bressler <garybressler@nc.rr.com>2010-04-08 17:11:08 -0400
commitceff6457bfeb5642616f4711f14e0bb652d12164 (patch)
treed05b4ebd1c3ee6e28884c669d65fd31700941086 /unit_trace/viz/format.py
parent01abc8352aa2fd192678b4066b26ea749a203801 (diff)
Updated the documentation to describe the visualizer, made unit-trace itself not require gtk/cairo, and a few other minor things.
Diffstat (limited to 'unit_trace/viz/format.py')
-rw-r--r--unit_trace/viz/format.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/unit_trace/viz/format.py b/unit_trace/viz/format.py
index 33e0b03..c544e26 100644
--- a/unit_trace/viz/format.py
+++ b/unit_trace/viz/format.py
@@ -13,41 +13,41 @@ class AlignMode(object):
13 LEFT = 0 13 LEFT = 0
14 CENTER = 1 14 CENTER = 1
15 RIGHT = 2 15 RIGHT = 2
16 16
17 BOTTOM = 3 17 BOTTOM = 3
18 TOP = 4 18 TOP = 4
19 19
20class GraphFormat(object): 20class GraphFormat(object):
21 """Container class for a bunch of optional and non-optional attributes to configure the appearance of the graph 21 """Container class for a bunch of optional and non-optional attributes to configure the appearance of the graph
22 (because it would be annoying to just have these all as raw arguments to the Graph constructor, and many people 22 (because it would be annoying to just have these all as raw arguments to the Graph constructor, and many people
23 probably don't care about most of them anyway).""" 23 probably don't care about most of them anyway)."""
24 24
25 GRID_COLOR = (0.7, 0.7, 0.7) 25 GRID_COLOR = (0.7, 0.7, 0.7)
26 HIGHLIGHT_COLOR = (0.85, 0.0, 0.0) 26 HIGHLIGHT_COLOR = (0.85, 0.0, 0.0)
27 BORDER_COLOR = (0.0, 0.0, 0.0) 27 BORDER_COLOR = (0.0, 0.0, 0.0)
28 LITE_BORDER_COLOR = (0.4, 0.4, 0.4) 28 LITE_BORDER_COLOR = (0.4, 0.4, 0.4)
29 29
30 BORDER_THICKNESS = 1 30 BORDER_THICKNESS = 1
31 GRID_THICKNESS = 1 31 GRID_THICKNESS = 1
32 AXIS_THICKNESS = 1 32 AXIS_THICKNESS = 1
33 33
34 BAND_THICKNESS = 1.5 34 BAND_THICKNESS = 1.5
35 BAND_COLOR = (0.85, 0.0, 0.0) 35 BAND_COLOR = (0.85, 0.0, 0.0)
36 36
37 X_AXIS_MEASURE_OFS = 30 37 X_AXIS_MEASURE_OFS = 30
38 X_AXIS_LABEL_GAP = 10 38 X_AXIS_LABEL_GAP = 10
39 Y_AXIS_ITEM_GAP = 10 39 Y_AXIS_ITEM_GAP = 10
40 MAJ_TICK_SIZE = 20 40 MAJ_TICK_SIZE = 20
41 MIN_TICK_SIZE = 12 41 MIN_TICK_SIZE = 12
42 42
43 BIG_ARROWHEAD_FACTOR = 0.2 43 BIG_ARROWHEAD_FACTOR = 0.2
44 SMALL_ARROWHEAD_FACTOR = 0.3 44 SMALL_ARROWHEAD_FACTOR = 0.3
45 TEE_FACTOR = 0.3 45 TEE_FACTOR = 0.3
46 46
47 DEF_FOPTS_LABEL = FontOptions("Times", 16, (0.0, 0.0, 0.0)) 47 DEF_FOPTS_LABEL = FontOptions("Times", 16, (0.0, 0.0, 0.0))
48 DEF_FOPTS_LABEL_SSCRIPT = FontOptions("Times", 8, (0.0, 0.0, 0.0)) 48 DEF_FOPTS_LABEL_SSCRIPT = FontOptions("Times", 8, (0.0, 0.0, 0.0))
49 DEF_FOPTS_MAJ = FontOptions("Times", 14, (0.1, 0.1, 0.1)) 49 DEF_FOPTS_MAJ = FontOptions("Times", 14, (0.1, 0.1, 0.1))
50 DEF_FOPTS_MIN = FontOptions("Times", 9, (0.1, 0.1, 0.1)) 50 DEF_FOPTS_MIN = FontOptions("Times", 9, (0.1, 0.1, 0.1))
51 DEF_FOPTS_ITEM = FontOptions("Times", 20, (0.0, 0.5, 0.1)) 51 DEF_FOPTS_ITEM = FontOptions("Times", 20, (0.0, 0.5, 0.1))
52 DEF_FOPTS_BAR = FontOptions("Times", 14, (0.0, 0.0, 0.0)) 52 DEF_FOPTS_BAR = FontOptions("Times", 14, (0.0, 0.0, 0.0))
53 DEF_FOPTS_BAR_SSCRIPT = FontOptions("Times", 7, (0.0, 0.0, 0.0)) 53 DEF_FOPTS_BAR_SSCRIPT = FontOptions("Times", 7, (0.0, 0.0, 0.0))
@@ -55,31 +55,31 @@ class GraphFormat(object):
55 DEF_FOPTS_MINI_BAR_SSCRIPT = FontOptions("Times", 7, (0.0, 0.0, 0.0)) 55 DEF_FOPTS_MINI_BAR_SSCRIPT = FontOptions("Times", 7, (0.0, 0.0, 0.0))
56 DEF_FOPTS_ARROW = FontOptions("Times", 12, (0.0, 0.0, 0.0)) 56 DEF_FOPTS_ARROW = FontOptions("Times", 12, (0.0, 0.0, 0.0))
57 DEF_FOPTS_ARROW_SSCRIPT = FontOptions("Times", 7, (0.0, 0.0, 0.0)) 57 DEF_FOPTS_ARROW_SSCRIPT = FontOptions("Times", 7, (0.0, 0.0, 0.0))
58 58
59 LEFT_SIDE_PAD = 30 59 LEFT_SIDE_PAD = 30
60 WIDTH_PAD = 50 60 WIDTH_PAD = 50
61 HEIGHT_PAD = 150 61 HEIGHT_PAD = 150
62 Y_ITEM_PAD_FACTOR = 0.5 62 Y_ITEM_PAD_FACTOR = 0.5
63 63
64 DEF_TIME_PER_MAJ = 10 64 DEF_TIME_PER_MAJ = 10
65 DEF_MAJ_SEP = 200 65 DEF_MAJ_SEP = 200
66 DEF_MIN_PER_MAJ = 5 66 DEF_MIN_PER_MAJ = 5
67 DEF_Y_ITEM_SIZE = 50 67 DEF_Y_ITEM_SIZE = 50
68 68
69 AXIS_LABEL_VERT_OFS = 30 69 AXIS_LABEL_VERT_OFS = 30
70 BAR_SIZE_FACTOR = 0.4 70 BAR_SIZE_FACTOR = 0.4
71 MINI_BAR_SIZE_FACTOR = 0.2 71 MINI_BAR_SIZE_FACTOR = 0.2
72 BAR_MINI_BAR_GAP_FACTOR = 0.1 72 BAR_MINI_BAR_GAP_FACTOR = 0.1
73 73
74 BAR_LABEL_OFS = 2 74 BAR_LABEL_OFS = 2
75 MINI_BAR_LABEL_OFS = 1 75 MINI_BAR_LABEL_OFS = 1
76 ARROW_LABEL_OFS = 2 76 ARROW_LABEL_OFS = 2
77 77
78 BLOCK_TRIANGLE_FACTOR = 0.7 78 BLOCK_TRIANGLE_FACTOR = 0.7
79 BIG_ARROW_FACTOR = 1.6 79 BIG_ARROW_FACTOR = 1.6
80 SMALL_ARROW_FACTOR = 0.6 80 SMALL_ARROW_FACTOR = 0.6
81 COMPLETION_MARKER_FACTOR = 1.6 81 COMPLETION_MARKER_FACTOR = 1.6
82 82
83 def __init__(self, time_per_maj=DEF_TIME_PER_MAJ, maj_sep=DEF_MAJ_SEP, \ 83 def __init__(self, time_per_maj=DEF_TIME_PER_MAJ, maj_sep=DEF_MAJ_SEP, \
84 min_per_maj=DEF_MIN_PER_MAJ, y_item_size=DEF_Y_ITEM_SIZE, bar_fopts=DEF_FOPTS_BAR, \ 84 min_per_maj=DEF_MIN_PER_MAJ, y_item_size=DEF_Y_ITEM_SIZE, bar_fopts=DEF_FOPTS_BAR, \
85 item_fopts=DEF_FOPTS_ITEM, show_min=False, majfopts=DEF_FOPTS_MAJ, \ 85 item_fopts=DEF_FOPTS_ITEM, show_min=False, majfopts=DEF_FOPTS_MAJ, \