Audacity 3.2.0
WavePaintParameters.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/*!********************************************************************
3
4 Audacity: A Digital Audio Editor
5
6 WavePaintParameters.h
7
8 Dmitry Vedenko
9
10**********************************************************************/
11#pragma once
12
13#include "graphics/Color.h"
14
15class Envelope;
16
18struct WAVE_TRACK_PAINT_API ColorPair final
19{
24
25 friend WAVE_TRACK_PAINT_API bool
26 operator==(const ColorPair& lhs, const ColorPair& rhs) noexcept;
27 friend WAVE_TRACK_PAINT_API bool
28 operator!=(const ColorPair& lhs, const ColorPair& rhs) noexcept;
29};
30
32struct WAVE_TRACK_PAINT_API WavePaintParameters final
33{
35 const Envelope* AttachedEnvelope { nullptr };
36
38 int Height { 0 };
39
40
42 double Min { -1.0 };
44 double Max { 1.0 };
45
47 double DBRange { 60.0 };
49 bool DBScale { false };
50
52 bool ShowClipping { false };
53
55 bool ShowRMS { true };
56
59
68
70 WavePaintParameters& SetDisplayParameters(int height, double zoomMin, double zoomMax, bool showClipping) noexcept;
72 WavePaintParameters& SetDBParameters(double dbRange, bool dbScale) noexcept;
74 WavePaintParameters& SetBlankColor(graphics::Color color) noexcept;
76 WavePaintParameters& SetBackgroundColors(
77 graphics::Color normal, graphics::Color selected) noexcept;
80 SetSampleColors(graphics::Color normal, graphics::Color selected) noexcept;
83 SetRMSColors(graphics::Color normal, graphics::Color selected) noexcept;
86 SetClippingColors(graphics::Color normal, graphics::Color selected) noexcept;
88 WavePaintParameters& SetEnvelope(const Envelope& envelope) noexcept;
90 WavePaintParameters& ResetEnvelope() noexcept;
92 WavePaintParameters& SetShowRMS(bool showRMS) noexcept;
93
94 friend WAVE_TRACK_PAINT_API bool operator==(
95 const WavePaintParameters& lhs,
96 const WavePaintParameters& rhs) noexcept;
97
98 friend WAVE_TRACK_PAINT_API bool operator!=(
99 const WavePaintParameters& lhs,
100 const WavePaintParameters& rhs) noexcept;
101};
bool operator==(const EffectReverbSettings &a, const EffectReverbSettings &b)
Definition: Reverb.cpp:632
bool operator!=(const WaveTrackLocation &a, const WaveTrackLocation &b)
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:72
Pair of colors for waveform painting.
graphics::Color Normal
Color for the normal state.
graphics::Color Selected
Color for the selected state.
Parameters for the waveform painting.
graphics::Color BlankColor
Color outside the waveform area.
ColorPair RMSColors
Color of the (-rms, +rms) line.
ColorPair SampleColors
Color of the (min, max) line.
ColorPair ClippingColors
Color for the columns where clipping has occurred.
ColorPair BackgroundColors
Waveform background color.
Class for storing color in 32-bit format.
Definition: Color.h:29