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...
 
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 { true }
 True, if we paint RMS values on top of min and max. More...
 
graphics::Color BlankColor
 Color outside the waveform area. More...
 
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 77 of file WavePaintParameters.cpp.

78{
79 AttachedEnvelope = nullptr;
80 return *this;
81}
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 42 of file WavePaintParameters.cpp.

44{
45 BackgroundColors = { normal, selected };
46 return *this;
47}
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 63 of file WavePaintParameters.cpp.

65{
66 ClippingColors = { normal, selected };
67 return *this;
68}
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 71 of file WavePaintParameters.cpp.

72{
73 AttachedEnvelope = &envelope;
74 return *this;
75}

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 56 of file WavePaintParameters.cpp.

58{
59 RMSColors = { normal, selected };
60 return *this;
61}
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 49 of file WavePaintParameters.cpp.

51{
52 SampleColors = { normal, selected };
53 return *this;
54}
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 83 of file WavePaintParameters.cpp.

84{
85 ShowRMS = showRMS;
86 return *this;
87}
bool ShowRMS
True, if we paint RMS values on top of min and max.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 114 of file WavePaintParameters.cpp.

117{
118 return !(lhs == rhs);
119}

◆ operator==

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

Definition at line 99 of file WavePaintParameters.cpp.

102{
103 return lhs.AttachedEnvelope == rhs.AttachedEnvelope &&
104 lhs.Height == rhs.Height && lhs.Min == rhs.Min &&
105 lhs.Max == rhs.Max && lhs.DBRange == rhs.DBRange &&
106 lhs.DBScale == rhs.DBScale && lhs.ShowClipping == rhs.ShowClipping &&
107 lhs.BlankColor == rhs.BlankColor &&
109 lhs.SampleColors == rhs.SampleColors &&
110 lhs.RMSColors == rhs.RMSColors &&
112}

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 61 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 67 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 65 of file WavePaintParameters.h.

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

◆ SampleColors

ColorPair WavePaintParameters::SampleColors

Color of the (min, max) line.

Definition at line 63 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 { true }

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().


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