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 149 of file AColor.h.

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

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

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

Here is the caller graph for this function: