mp_traversals
Terrible Traversals
GridColorPicker Class Reference

A color picker class using grid color picking algorithm. More...

#include <GridColorPicker.h>

Inheritance diagram for GridColorPicker:
[legend]
Collaboration diagram for GridColorPicker:
[legend]

Public Member Functions

 GridColorPicker (HSLAPixel gridColor, HSLAPixel backgroundColor, unsigned spacing)
 GridColorPicker constructor. More...
 
HSLAPixel getColor (unsigned x, unsigned y)
 Picks the color for pixel (x, y). More...
 
- Public Member Functions inherited from ColorPicker
virtual ~ColorPicker ()
 Class destructor. More...
 

Private Attributes

HSLAPixel gridColor
 
HSLAPixel backgroundColor
 
unsigned spacing
 

Detailed Description

A color picker class using grid color picking algorithm.

Constructor & Destructor Documentation

◆ GridColorPicker()

GridColorPicker::GridColorPicker ( HSLAPixel  gridColor,
HSLAPixel  backgroundColor,
unsigned  spacing 
)

GridColorPicker constructor.

Member Function Documentation

◆ getColor()

HSLAPixel GridColorPicker::getColor ( unsigned  x,
unsigned  y 
)
virtual

Picks the color for pixel (x, y).

Color will be choosed as grid

Parameters
xThe x coordinate to pick a color for.
yThe y coordinate to pick a color for.
Returns
The color selected for (x, y).

Implements ColorPicker.

Member Data Documentation

◆ backgroundColor

HSLAPixel GridColorPicker::backgroundColor
private

◆ gridColor

HSLAPixel GridColorPicker::gridColor
private

◆ spacing

unsigned GridColorPicker::spacing
private

The documentation for this class was generated from the following files: