gridColorPicker: a functor that determines the color that should be used given an x and a y coordinate using a grid pattern.
More...
#include "gridColorPicker.h"
gridColorPicker: a functor that determines the color that should be used given an x and a y coordinate using a grid pattern.
- Author
- CS 225 Staff
- Date
- Fall 2010
gridColorPicker::gridColorPicker |
( |
RGBAPixel |
fillColor, |
|
|
int |
gridSpacing |
|
) |
| |
Constructs a new gridColorPicker.
- Parameters
-
fillColor | Color for the border between cells of the grid. |
gridSpacing | Spacing between cells of the grid. |
RGBAPixel gridColorPicker::operator() |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
|
virtual |
Picks the color for pixel (x, y).
If the x or y coordinate is a multiple of the spacing, it will be filled with the fillColor. otherwise, it will be filled with white.
- Parameters
-
x | The x coordinate to pick a color for. |
y | The y coordinat to pick a color for. |
- Returns
- The color chosen for (x, y).
Implements colorPicker.
Color used for the grid border.
int gridColorPicker::spacing |
|
private |
Spacing for cells in the grid.
The documentation for this class was generated from the following files: