public
Rubygem
Description: Gruff graphing library for Ruby
Homepage: http://gruff.rubyforge.org
Clone URL: git://github.com/topfunky/gruff.git
Search Repo:
Test for transparent background in theme
topfunky (author)
Tue Mar 18 11:09:39 -0700 2008
commit  3bd90836f56a2c49cbdd92f043a7bcf77f44ac39
tree    3514e9f27a3d51e4c53ac56eb7ed85df711163dc
parent  defc9aa87b67bc2527e21d9defce513b46a270d2
...
5
6
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
9
10
11
...
118
119
120
121
122
123
124
125
126
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
129
130
131
132
133
134
135
136
137
138
139
...
439
440
441
442
443
444
445
...
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
...
139
140
141
 
 
 
 
 
 
 
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
 
 
 
 
 
 
 
 
158
159
160
...
460
461
462
 
463
464
465
0
@@ -5,6 +5,27 @@
0
 class TestGruffLine < GruffTestCase
0
 
0
   # TODO Delete old output files once when starting tests
0
+
0
+ def test_should_render_with_transparent_theme
0
+ g = Gruff::Line.new(400)
0
+ g.title = "Transparent Background"
0
+ g.theme = {
0
+ :colors => ['black', 'grey'],
0
+ :marker_color => 'grey',
0
+ :font_color => 'black',
0
+ :background_colors => 'transparent'
0
+ }
0
+
0
+ g.labels = {
0
+ 0 => '5/6',
0
+ 1 => '5/15',
0
+ 2 => '5/24',
0
+ 3 => '5/30',
0
+ }
0
+ g.data(:apples, [-1, 0, 4, -4])
0
+ g.data(:peaches, [10, 8, 6, 3])
0
+ g.write("test/output/line_transparent.png")
0
+ end
0
   
0
   def test_line_graph_with_themes
0
     line_graph_with_themes()
0
0
@@ -118,22 +139,22 @@
0
     g.write("test/output/line_large.png")
0
   end
0
     
0
- def test_long_title
0
-
0
- end
0
-
0
- def test_add_colors
0
-
0
- end
0
+ # def test_long_title
0
+ #
0
+ # end
0
+ #
0
+ # def test_add_colors
0
+ #
0
+ # end
0
+ #
0
+ # def test_request_too_many_colors
0
+ #
0
+ # end
0
+ #
0
+ # def test_add_data
0
+ #
0
+ # end
0
 
0
- def test_request_too_many_colors
0
-
0
- end
0
-
0
- def test_add_data
0
-
0
- end
0
-
0
   def test_many_datapoints
0
     g = Gruff::Line.new
0
     g.title = "Many Multi-Line Graph Test"
0
@@ -439,7 +460,6 @@
0
     end
0
     g.write("test/output/line_theme_37signals_#{size}.png")
0
   
0
-
0
     g = Gruff::Line.new(size)
0
     g.title = "Multi-Line Graph Test #{size}"
0
     g.labels = @labels

Comments

    No one has commented yet.