File: Gradient.h

package info (click to toggle)
gravitation 3%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 2,176 kB
  • ctags: 1,599
  • sloc: cpp: 13,160; objc: 245; sh: 134; makefile: 94; perl: 67
file content (25 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef GRADIENT_INCLUDED
#define GRADIENT_INCLUDED

#include "common.h"

#include "minorGems/util/SimpleVector.h"



class Gradient {
    public:
        
        Gradient( int inNumPoints, double *inPointAnchors,
                  rgbColor *inPointColors );
        
        // samples from location in range [0,1] along gradient
        rgbColor sample( double inLocation );
        
    private:
        SimpleVector<double> mAnchors;
        SimpleVector<rgbColor> mColors;
    };


#endif