Vault  4.1
Public Member Functions | Protected Member Functions
VDoubleColorMapper Class Reference

VDoubleColorMapper maps double values to colors. More...

#include <vcolor.h>

Inheritance diagram for VDoubleColorMapper:
VColorMapper

List of all members.

Public Member Functions

virtual VColorPair getColors (const VString &stringValue) const
virtual VColorPair getColors (int intValue) const
virtual VColorPair getColors (Vs64 int64Value) const
virtual VColorPair getColors (VDouble doubleValue) const
void addColors (VDouble doubleValue, const VColorPair &rangeColors)

Protected Member Functions

virtual void _readColorElement (const VSettingsNode &colorNode)

Detailed Description

VDoubleColorMapper maps double values to colors.

Note that because of the usual floating-point discrepancies, we don't attempt to provide a mapping of arbitrary precision values here. Instead, we convert each key value to a string with 6 digits after the decimal point. This way we can get perfect matching in the map of values to that level of precision, regardless of the math operations that generate them. It does, however come at the cost of string conversion. If you want more precision then you probably want to use the VDoubleRangeColorMapper and treat the values as boundaries rather than keys.

Definition at line 373 of file vcolor.h.


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

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.