Audacity  2.2.2
Classes | Functions
AColor.h File Reference
#include "MemoryX.h"
#include <wx/brush.h>
#include <wx/pen.h>

Go to the source code of this file.


struct  DCUnchanger
 Used to restore pen, brush and logical-op in a DC back to what they were. More...
class  ADCChanger
 Makes temporary drawing context changes that you back out of, RAII style. More...
class  AColor
 AColor Manages color brushes and pens. More...


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

Function Documentation

void GetColorGradient ( float  value,
AColor::ColorGradientChoice  selected,
bool  grayscale,
unsigned char *__restrict  red,
unsigned char *__restrict  green,
unsigned char *__restrict  blue 

Definition at line 157 of file AColor.h.

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

Referenced by TrackArtist::DrawClipSpectrum().

162  {
164  int idx = value * (AColor::gradientSteps - 1);
166  *red = AColor::gradient_pre[selected][grayscale][idx][0];
167  *green = AColor::gradient_pre[selected][grayscale][idx][1];
168  *blue = AColor::gradient_pre[selected][grayscale][idx][2];
169 }
static const int gradientSteps
Definition: AColor.h:143
static unsigned char gradient_pre[ColorGradientTotal][2][gradientSteps][3]
Definition: AColor.h:144