-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsolidColorPicker.h
44 lines (39 loc) · 1.02 KB
/
solidColorPicker.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @file solidColorPicker.h
* Definition of a solid color picker.
*
*/
#ifndef _SOLIDCOLORPICKER_H_
#define _SOLIDCOLORPICKER_H_
#include "colorPicker.h"
/**
* SolidColorPicker: a functor that determines the color that should be
* used given an x and y coordinate using a solid pattern. You can create
* private helper functions inside this class, as well as local storage, if
* necessary. Remember to overload a destructor if you need to.
*
*/
class SolidColorPicker : public ColorPicker
{
public:
/**
* Constructs a new solidColorPicker.
*
* @param fillColor The color for this color picker.
*/
SolidColorPicker(HSLAPixel fillColor);
/**
* Picks the color for pixel (x, y).
*
* Simply returns the same color (used to construct the picker) all
* of the time.
*/
virtual HSLAPixel operator()(point p);
private:
/**
* @todo Define any additional private member variables or helper
* functions here as you see fit.
*/
HSLAPixel color;
};
#endif