Audacity 3.2.0
Classes | Functions
AColor.h File Reference
#include <memory>
#include <wx/brush.h>
#include <wx/pen.h>
Include dependency graph for AColor.h:

Go to the source code of this file.

Classes

class  AColor
 AColor Manages color brushes and pens. More...
 

Functions

void GetColorGradient (float value, AColor::ColorGradientChoice selected, int colorScheme, unsigned char *__restrict red, unsigned char *__restrict green, unsigned char *__restrict blue)
 

Function Documentation

◆ GetColorGradient()

void GetColorGradient ( float  value,
AColor::ColorGradientChoice  selected,
int  colorScheme,
unsigned char *__restrict  red,
unsigned char *__restrict  green,
unsigned char *__restrict  blue 
)
inline

Definition at line 150 of file AColor.h.

155 {
156
157 int idx = value * (AColor::gradientSteps - 1);
158
159 *red = AColor::gradient_pre[selected][colorScheme][idx][0];
160 *green = AColor::gradient_pre[selected][colorScheme][idx][1];
161 *blue = AColor::gradient_pre[selected][colorScheme][idx][2];
162}
static const int gradientSteps
Definition: AColor.h:136
static unsigned char gradient_pre[ColorGradientTotal][colorSchemes][gradientSteps][3]
Definition: AColor.h:137

References AColor::gradient_pre, and AColor::gradientSteps.

Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum().

Here is the caller graph for this function: