@@ -47,7 +47,7 @@ our $tool_name = basename($0);
47
47
sub gen_png ($$$$@);
48
48
sub check_and_load_module ($);
49
49
sub genpng_print_usage (*);
50
- sub genpng_process_file ($$$$);
50
+ sub genpng_process_file ($$$$$ );
51
51
sub genpng_warn_handler ($);
52
52
sub genpng_die_handler ($);
53
53
@@ -74,6 +74,7 @@ if (!caller)
74
74
my $filename ;
75
75
my $tab_size = 4;
76
76
my $width = 80;
77
+ my $dark = 0;
77
78
my $out_filename ;
78
79
my $help ;
79
80
my $version ;
@@ -85,6 +86,7 @@ if (!caller)
85
86
if (!GetOptions(" tab-size=i" => \$tab_size ,
86
87
" width=i" => \$width ,
87
88
" output-filename=s" => \$out_filename ,
89
+ " dark-mode" => \$dark ,
88
90
" help" => \$help ,
89
91
" version" => \$version ))
90
92
{
@@ -121,7 +123,7 @@ if (!caller)
121
123
$out_filename = " $filename .png" ;
122
124
}
123
125
124
- genpng_process_file($filename , $out_filename , $width , $tab_size );
126
+ genpng_process_file($filename , $out_filename , $width , $tab_size , $dark );
125
127
exit (0);
126
128
}
127
129
@@ -146,6 +148,7 @@ or .gcov file format.
146
148
-v, --version Print version number, then exit
147
149
-t, --tab-size TABSIZE Use TABSIZE spaces in place of tab
148
150
-w, --width WIDTH Set width of output image to WIDTH pixel
151
+ -d, --dark-mode Use a light-on-dark color scheme
149
152
-o, --output-filename FILENAME Write image to FILENAME
150
153
151
154
For more information see: $lcov_url
@@ -170,15 +173,16 @@ sub check_and_load_module($)
170
173
171
174
172
175
#
173
- # genpng_process_file(filename, out_filename, width, tab_size)
176
+ # genpng_process_file(filename, out_filename, width, tab_size, dark )
174
177
#
175
178
176
- sub genpng_process_file ($$$$)
179
+ sub genpng_process_file ($$$$$ )
177
180
{
178
181
my $filename = $_ [0];
179
182
my $out_filename = $_ [1];
180
183
my $width = $_ [2];
181
184
my $tab_size = $_ [3];
185
+ my $dark = $_ [4];
182
186
local *HANDLE;
183
187
my @source ;
184
188
@@ -215,7 +219,7 @@ sub genpng_process_file($$$$)
215
219
}
216
220
close (HANDLE);
217
221
218
- gen_png($out_filename , 0 , $width , $tab_size , @source );
222
+ gen_png($out_filename , $dark , $width , $tab_size , @source );
219
223
}
220
224
221
225
0 commit comments