| 308 | //------------------------------------------------------------------------------ |
| 309 | |
| 310 | static WaveformColors createWaveformColors(const Options& options) |
| 311 | { |
| 312 | WaveformColors colors; |
| 313 | |
| 314 | const std::string& color_scheme = options.getColorScheme(); |
| 315 | |
| 316 | if (color_scheme == "audacity") { |
| 317 | colors = audacity_waveform_colors; |
| 318 | } |
| 319 | else if (color_scheme == "audition") { |
| 320 | colors = audition_waveform_colors; |
| 321 | } |
| 322 | else { |
| 323 | throwError("Unknown color scheme: %1%", color_scheme); |
| 324 | } |
| 325 | |
| 326 | if (options.hasBorderColor()) { |
| 327 | colors.border_color = options.getBorderColor(); |
| 328 | } |
| 329 | |
| 330 | if (options.hasBackgroundColor()) { |
| 331 | colors.background_color = options.getBackgroundColor(); |
| 332 | } |
| 333 | |
| 334 | if (options.hasWaveformColor()) { |
| 335 | colors.waveform_colors = options.getWaveformColors(); |
| 336 | } |
| 337 | |
| 338 | if (options.hasAxisLabelColor()) { |
| 339 | colors.axis_label_color = options.getAxisLabelColor(); |
| 340 | } |
| 341 | |
| 342 | return colors; |
| 343 | } |
| 344 | |
| 345 | //------------------------------------------------------------------------------ |
| 346 |
no test coverage detected