Audacity  3.0.3
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 140 of file AColor.h.

145  {
146 
147  int idx = value * (AColor::gradientSteps - 1);
148 
149  *red = AColor::gradient_pre[selected][colorScheme][idx][0];
150  *green = AColor::gradient_pre[selected][colorScheme][idx][1];
151  *blue = AColor::gradient_pre[selected][colorScheme][idx][2];
152 }

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

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

Here is the caller graph for this function:
AColor::gradientSteps
static const int gradientSteps
Definition: AColor.h:126
AColor::gradient_pre
static unsigned char gradient_pre[ColorGradientTotal][colorSchemes][gradientSteps][3]
Definition: AColor.h:127