Engauge Digitizer 2
|
Base class for strategy pattern whose subclasses process the different color filter settings modes (one strategy per mode). More...
#include <ColorFilterStrategyAbstractBase.h>
Public Member Functions | |
ColorFilterStrategyAbstractBase () | |
Single constructor. | |
virtual | ~ColorFilterStrategyAbstractBase () |
virtual double | pixelToZeroToOne (const QColor &pixel, QRgb rgbBackground) const =0 |
Return a normalized value of 0 to 1 given input pixel. | |
virtual int | zeroToOneToValue (double s) const =0 |
Return the low value normalized to 0 to 1. | |
Base class for strategy pattern whose subclasses process the different color filter settings modes (one strategy per mode).
The strategy pattern nicely removes cyclomatic complexity from ColorFilter
Definition at line 19 of file ColorFilterStrategyAbstractBase.h.
ColorFilterStrategyAbstractBase::ColorFilterStrategyAbstractBase | ( | ) |
|
virtual |
Definition at line 13 of file ColorFilterStrategyAbstractBase.cpp.
|
pure virtual |
Return a normalized value of 0 to 1 given input pixel.
Implemented in ColorFilterStrategyForeground, ColorFilterStrategyHue, ColorFilterStrategyIntensity, ColorFilterStrategySaturation, and ColorFilterStrategyValue.
Return the low value normalized to 0 to 1.
Implemented in ColorFilterStrategyForeground, ColorFilterStrategyHue, ColorFilterStrategyIntensity, ColorFilterStrategySaturation, and ColorFilterStrategyValue.