Audacity 3.2.0
Public Member Functions | Public Attributes | Friends | List of all members
WavePaintParameters Struct Referencefinal

Parameters for the waveform painting. More...

#include <WavePaintParameters.h>

Collaboration diagram for WavePaintParameters:
[legend]

Public Member Functions

WavePaintParametersSetDisplayParameters (int height, double zoomMin, double zoomMax, bool showClipping) noexcept
 Sets the basic painting parameters. More...
 
WavePaintParametersSetDBParameters (double dbRange, bool dbScale) noexcept
 Sets the dB scale parameters. More...
 
WavePaintParametersSetBlankColor (graphics::Color color) noexcept
 Sets the blank color. More...
 
WavePaintParametersSetZeroLineColor (graphics::Color color) noexcept
 Sets the horizontal zero line color. More...
 
WavePaintParametersSetBackgroundColors (graphics::Color normal, graphics::Color selected) noexcept
 Sets the background colors. More...
 
WavePaintParametersSetSampleColors (graphics::Color normal, graphics::Color selected) noexcept
 Sets the sample colors. More...
 
WavePaintParametersSetRMSColors (graphics::Color normal, graphics::Color selected) noexcept
 Sets the RMS colors. More...
 
WavePaintParametersSetClippingColors (graphics::Color normal, graphics::Color selected) noexcept
 Sets the clipping colors. More...
 
WavePaintParametersSetEnvelope (const Envelope &envelope) noexcept
 Sets volume envelope. More...
 
WavePaintParametersResetEnvelope () noexcept
 Resets the envelope. More...
 
WavePaintParametersSetShowRMS (bool showRMS) noexcept
 Sets the ShowRMS flag. More...
 

Public Attributes

const EnvelopeAttachedEnvelope { nullptr }
 Attached volume envelope, if any. More...
 
int Height { 0 }
 Height of the of clip on screen. More...
 
double Min { -1.0 }
 Min value used to clip the output. More...
 
double Max { 1.0 }
 Max value used to clip the output. More...
 
double DBRange { 60.0 }
 Decibel range. More...
 
bool DBScale { false }
 True, if we paint in dB scale. More...
 
bool ShowClipping { false }
 True, if we mark clipped values. More...
 
bool ShowRMS { false }
 True, if we paint RMS values on top of min and max. More...
 
graphics::Color BlankColor
 Color outside the waveform area. More...
 
graphics::Color ZeroLineColor
 
ColorPair BackgroundColors
 Waveform background color. More...
 
ColorPair SampleColors
 Color of the (min, max) line. More...
 
ColorPair RMSColors
 Color of the (-rms, +rms) line. More...
 
ColorPair ClippingColors
 Color for the columns where clipping has occurred. More...
 

Friends

WAVE_TRACK_PAINT_API bool operator== (const WavePaintParameters &lhs, const WavePaintParameters &rhs) noexcept
 
WAVE_TRACK_PAINT_API bool operator!= (const WavePaintParameters &lhs, const WavePaintParameters &rhs) noexcept
 

Detailed Description

Parameters for the waveform painting.

Definition at line 32 of file WavePaintParameters.h.

Member Function Documentation

◆ ResetEnvelope()

WavePaintParameters & WavePaintParameters::ResetEnvelope ( )
noexcept

Resets the envelope.

Definition at line 83 of file WavePaintParameters.cpp.

84{
85 AttachedEnvelope = nullptr;
86 return *this;
87}
const Envelope * AttachedEnvelope
Attached volume envelope, if any.

References AttachedEnvelope.

◆ SetBackgroundColors()

WavePaintParameters & WavePaintParameters::SetBackgroundColors ( graphics::Color  normal,
graphics::Color  selected 
)
noexcept

Sets the background colors.

Definition at line 48 of file WavePaintParameters.cpp.

50{
51 BackgroundColors = { normal, selected };
52 return *this;
53}
ColorPair BackgroundColors
Waveform background color.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetBlankColor()

WavePaintParameters & WavePaintParameters::SetBlankColor ( graphics::Color  color)
noexcept

Sets the blank color.

Definition at line 35 of file WavePaintParameters.cpp.

36{
37 BlankColor = color;
38
39 return *this;
40}
graphics::Color BlankColor
Color outside the waveform area.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetClippingColors()

WavePaintParameters & WavePaintParameters::SetClippingColors ( graphics::Color  normal,
graphics::Color  selected 
)
noexcept

Sets the clipping colors.

Definition at line 69 of file WavePaintParameters.cpp.

71{
72 ClippingColors = { normal, selected };
73 return *this;
74}
ColorPair ClippingColors
Color for the columns where clipping has occurred.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetDBParameters()

WavePaintParameters & WavePaintParameters::SetDBParameters ( double  dbRange,
bool  dbScale 
)
noexcept

Sets the dB scale parameters.

Definition at line 26 of file WavePaintParameters.cpp.

27{
28 DBRange = dbRange;
29 DBScale = dbScale;
30
31 return *this;
32}
bool DBScale
True, if we paint in dB scale.
double DBRange
Decibel range.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetDisplayParameters()

WavePaintParameters & WavePaintParameters::SetDisplayParameters ( int  height,
double  zoomMin,
double  zoomMax,
bool  showClipping 
)
noexcept

Sets the basic painting parameters.


Audacity: A Digital Audio Editor

WavePaintParameters.cpp

Dmitry Vedenko

Definition at line 13 of file WavePaintParameters.cpp.

15{
16 Height = height;
17 Min = zoomMin;
18 Max = zoomMax;
19
20 ShowClipping = showClipping;
21
22 return *this;
23}
bool ShowClipping
True, if we mark clipped values.
double Max
Max value used to clip the output.
int Height
Height of the of clip on screen.
double Min
Min value used to clip the output.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetEnvelope()

WavePaintParameters & WavePaintParameters::SetEnvelope ( const Envelope envelope)
noexcept

Sets volume envelope.

Definition at line 77 of file WavePaintParameters.cpp.

78{
79 AttachedEnvelope = &envelope;
80 return *this;
81}

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetRMSColors()

WavePaintParameters & WavePaintParameters::SetRMSColors ( graphics::Color  normal,
graphics::Color  selected 
)
noexcept

Sets the RMS colors.

Definition at line 62 of file WavePaintParameters.cpp.

64{
65 RMSColors = { normal, selected };
66 return *this;
67}
ColorPair RMSColors
Color of the (-rms, +rms) line.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetSampleColors()

WavePaintParameters & WavePaintParameters::SetSampleColors ( graphics::Color  normal,
graphics::Color  selected 
)
noexcept

Sets the sample colors.

Definition at line 55 of file WavePaintParameters.cpp.

57{
58 SampleColors = { normal, selected };
59 return *this;
60}
ColorPair SampleColors
Color of the (min, max) line.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetShowRMS()

WavePaintParameters & WavePaintParameters::SetShowRMS ( bool  showRMS)
noexcept

Sets the ShowRMS flag.

Definition at line 89 of file WavePaintParameters.cpp.

90{
91 ShowRMS = showRMS;
92 return *this;
93}
bool ShowRMS
True, if we paint RMS values on top of min and max.

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

◆ SetZeroLineColor()

WavePaintParameters & WavePaintParameters::SetZeroLineColor ( graphics::Color  color)
noexcept

Sets the horizontal zero line color.

Definition at line 42 of file WavePaintParameters.cpp.

43{
44 ZeroLineColor = color;
45 return *this;
46}
graphics::Color ZeroLineColor

Referenced by anonymous_namespace{WaveformView.cpp}::DrawWaveform().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator!=

WAVE_TRACK_PAINT_API bool operator!= ( const WavePaintParameters lhs,
const WavePaintParameters rhs 
)
friend

Definition at line 121 of file WavePaintParameters.cpp.

124{
125 return !(lhs == rhs);
126}

◆ operator==

WAVE_TRACK_PAINT_API bool operator== ( const WavePaintParameters lhs,
const WavePaintParameters rhs 
)
friend

Definition at line 105 of file WavePaintParameters.cpp.

108{
109 return lhs.AttachedEnvelope == rhs.AttachedEnvelope &&
110 lhs.Height == rhs.Height && lhs.Min == rhs.Min &&
111 lhs.Max == rhs.Max && lhs.DBRange == rhs.DBRange &&
112 lhs.DBScale == rhs.DBScale && lhs.ShowClipping == rhs.ShowClipping &&
113 lhs.ShowRMS == rhs.ShowRMS &&
114 lhs.BlankColor == rhs.BlankColor &&
116 lhs.SampleColors == rhs.SampleColors &&
117 lhs.RMSColors == rhs.RMSColors &&
119}

Member Data Documentation

◆ AttachedEnvelope

const Envelope* WavePaintParameters::AttachedEnvelope { nullptr }

Attached volume envelope, if any.

Definition at line 35 of file WavePaintParameters.h.

Referenced by ResetEnvelope().

◆ BackgroundColors

ColorPair WavePaintParameters::BackgroundColors

Waveform background color.

Definition at line 62 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ BlankColor

graphics::Color WavePaintParameters::BlankColor

Color outside the waveform area.

Definition at line 58 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::InitializeElement(), and WaveBitmapCache::LookupHelper::PerformLookup().

◆ ClippingColors

ColorPair WavePaintParameters::ClippingColors

Color for the columns where clipping has occurred.

Definition at line 68 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ DBRange

double WavePaintParameters::DBRange { 60.0 }

Decibel range.

Definition at line 47 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ DBScale

bool WavePaintParameters::DBScale { false }

True, if we paint in dB scale.

Definition at line 49 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ Height

int WavePaintParameters::Height { 0 }

Height of the of clip on screen.

Definition at line 38 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::InitializeElement(), and WaveBitmapCache::LookupHelper::PerformLookup().

◆ Max

double WavePaintParameters::Max { 1.0 }

Max value used to clip the output.

Definition at line 44 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ Min

double WavePaintParameters::Min { -1.0 }

Min value used to clip the output.

Definition at line 42 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ RMSColors

ColorPair WavePaintParameters::RMSColors

Color of the (-rms, +rms) line.

Definition at line 66 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ SampleColors

ColorPair WavePaintParameters::SampleColors

Color of the (min, max) line.

Definition at line 64 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ ShowClipping

bool WavePaintParameters::ShowClipping { false }

True, if we mark clipped values.

Definition at line 52 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ ShowRMS

bool WavePaintParameters::ShowRMS { false }

True, if we paint RMS values on top of min and max.

Definition at line 55 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().

◆ ZeroLineColor

graphics::Color WavePaintParameters::ZeroLineColor

Definition at line 59 of file WavePaintParameters.h.

Referenced by WaveBitmapCache::LookupHelper::PerformLookup().


The documentation for this struct was generated from the following files: