Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
ColorFilterStrategyValue Class Reference

Leaf class for value strategy for ColorFilter. More...

#include <ColorFilterStrategyValue.h>

Inheritance diagram for ColorFilterStrategyValue:
Inheritance graph
Collaboration diagram for ColorFilterStrategyValue:
Collaboration graph

Public Member Functions

 ColorFilterStrategyValue ()
 Single constructor. More...
 
virtual ~ColorFilterStrategyValue ()
 
virtual double pixelToZeroToOne (const QColor &pixel, QRgb rgbBackground) const
 Return a normalized value of 0 to 1 given input pixel. More...
 
virtual int zeroToOneToValue (double s) const
 Return the low value normalized to 0 to 1. More...
 
- Public Member Functions inherited from ColorFilterStrategyAbstractBase
 ColorFilterStrategyAbstractBase ()
 Single constructor. More...
 
virtual ~ColorFilterStrategyAbstractBase ()
 

Detailed Description

Leaf class for value strategy for ColorFilter.

Definition at line 13 of file ColorFilterStrategyValue.h.

Constructor & Destructor Documentation

ColorFilterStrategyValue::ColorFilterStrategyValue ( )

Single constructor.

Definition at line 12 of file ColorFilterStrategyValue.cpp.

13 {
14 }
ColorFilterStrategyValue::~ColorFilterStrategyValue ( )
virtual

Definition at line 16 of file ColorFilterStrategyValue.cpp.

17 {
18 }

Member Function Documentation

double ColorFilterStrategyValue::pixelToZeroToOne ( const QColor &  pixel,
QRgb  rgbBackground 
) const
virtual

Return a normalized value of 0 to 1 given input pixel.

Implements ColorFilterStrategyAbstractBase.

Definition at line 20 of file ColorFilterStrategyValue.cpp.

22 {
23  return pixel.valueF();
24 }
int ColorFilterStrategyValue::zeroToOneToValue ( double  s) const
virtual

Return the low value normalized to 0 to 1.

Implements ColorFilterStrategyAbstractBase.

Definition at line 26 of file ColorFilterStrategyValue.cpp.

27 {
28  return qFloor (VALUE_MIN + s * (VALUE_MAX - VALUE_MIN));
29 }
const int VALUE_MAX
const int VALUE_MIN

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