IGLib  1.5
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
IG.Lib.IColorScale Interface Reference

More...

+ Inheritance diagram for IG.Lib.IColorScale:

Public Member Functions

double FromReference (double referenceValue)
 Transforms the specified value from reference domain (interval [0,1]) to actual domain. More...
 
double ToReference (double actualValue)
 Transforms the specified value from actual domain to reference domain (interval [0,1]). More...
 
color GetColor (double value)
 Returns the color from the current collor scale that corresponds to the specified value. More...
 
color GetReferenceColor (double referenceValue)
 Returns the color from the current color scale that corresponds to the specified value in the reference domain (interval [0,1]). More...
 
color GetContinuousReferenceColor (double referenceValue)
 Returns the CONTINUOUS color from the current color scale that corresponds to the specified value in the REFERENCE domain (interval [0, 1]). More...
 
color GetContinuousColor (double value)
 Returns the CONTINUOUS color from the current color scale that corresponds to the specified value. More...
 
double GetReferenceCellValue (int cellIndex)
 Returns the reference value (in the interval [0, 1]) corresponding to the specified cell in the discrete color map. This value is used to obtain the uniform (discrete) color of the cell by the methods that produces continuous scale colors (continuous methods are usually basis for scale definitions). More...
 
double GetCellValue (int cellIndex)
 Returns the value corresponding to the specified cell in the discrete color map. This value is used to obtain the uniform (discrete) color of the cell by the methods that produces continuous scale colors (continuous methods are usually basis for scale definitions). More...
 
color GetCellColor (int cellIndex)
 Returns the (discrete) color corresponding to the specified cell index. If the index is out of range then the lowest or the highest cell color is returned, dependent on whether the value is smaller than lower bound or greater than upper bound. More...
 
int GetReferenceCellIndex (double referenceValue)
 Retuns index of the cell of the discrete color scale that corresponds to the specified value in the reference domain (interval [0, 1]). More...
 
int GetCellIndex (double value)
 Retuns index of the cell of the discrete color scale that corresponds to the specified value (in the actusl domain). More...
 
color GetDiscreteReferenceColor (double referenceValue)
 Returns a color from the DISCRETE color scale represented by the current object that corresponds to he specified value in the REFERENCE domain (interval [0, 1]). More...
 
color GetDiscreteColor (double value)
 Returns a color from the DISCRETE color scale represented by the current object that corresponds to he specified value (in the actual domain). More...
 

Properties

bool IsDiscrete [get]
 Gets the flag indicating whether the color scale is discrete (with a finite number of possible colors, as opposed to continuous). More...
 
int NumCells [get, set]
 Number of cells in discrete color scale. More...
 

Detailed Description

Color scale.

Mapping from scalar values to colors, defining continuous or discrete color scales.

This class was initially used in GUI building for fadeouts, but has now broader applicaton and is used in all kins of graphical applications. This is also the reason that it is placed in the IG.Lib namespace. Discrete color values are added in 2011 for needs in graphic applications.

$A Igor Jul08 Oct11;

Member Function Documentation

double IG.Lib.IColorScale.FromReference ( double  referenceValue)

Transforms the specified value from reference domain (interval [0,1]) to actual domain.

Parameters
referenceValueValue in the reference domain.
Returns
Value in the actual domain corresponding to the specified value in the reference domain.

Implemented in IG.Lib.ColorScaleBase, and IG.Lib.ColorScale.

double IG.Lib.IColorScale.ToReference ( double  actualValue)

Transforms the specified value from actual domain to reference domain (interval [0,1]).

Parameters
actualValueValue in the actual domain.
Returns
Value in the reference domain corresponding to the specified value in the actual domain.

Implemented in IG.Lib.ColorScaleBase, and IG.Lib.ColorScale.

color IG.Lib.IColorScale.GetColor ( double  value)

Returns the color from the current collor scale that corresponds to the specified value.

Scale can be continuous or discrete (in the latter case IsDiscrete is true).

To get a color from the scale corresponding to a value in the reference domain [0,1], use the GetReferenceColor method instead.

Parameters
valueValue for which the corresponding color is returned.

Implemented in IG.Lib.ColorScaleBase.

Referenced by IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridContours(), IG.Gr3d.TestVtkGraphicBase.ExampleCellsGridEfficient(), and IG.Gr3d.TestVtkGraphicBase.ExampleStructuredGrid().

color IG.Lib.IColorScale.GetReferenceColor ( double  referenceValue)

Returns the color from the current color scale that corresponds to the specified value in the reference domain (interval [0,1]).

Scale can be continuous or discrete (in the latter case IsDiscrete is true).

Parameters
referenceValueValue from the interval [0, 1] (the reference domain) for which the corresponding color is returned.

Implemented in IG.Lib.ColorScaleBase.

color IG.Lib.IColorScale.GetContinuousReferenceColor ( double  referenceValue)

Returns the CONTINUOUS color from the current color scale that corresponds to the specified value in the REFERENCE domain (interval [0, 1]).

Scale can be continuous or discrete (in the latter case IsDiscrete is true).

Parameters
referenceValueValue in the reference domain (interval [0, 1]) for which the corresponding color is returned.

Implemented in IG.Lib.ColorScaleBase, and IG.Lib.ColorScale.

color IG.Lib.IColorScale.GetContinuousColor ( double  value)

Returns the CONTINUOUS color from the current color scale that corresponds to the specified value.

Scale can be continuous or discrete (in the latter case IsDiscrete is true).

Parameters
valueValue (in the actual domain) for which the corresponding color is returned.

Implemented in IG.Lib.ColorScaleBase.

double IG.Lib.IColorScale.GetReferenceCellValue ( int  cellIndex)

Returns the reference value (in the interval [0, 1]) corresponding to the specified cell in the discrete color map. This value is used to obtain the uniform (discrete) color of the cell by the methods that produces continuous scale colors (continuous methods are usually basis for scale definitions).

Parameters
cellIndexIndex of the cell for which the corresponding characteristic value (usually in the middle of the cell interval) is returned.

Implemented in IG.Lib.ColorScaleBase, and IG.Lib.ColorScale.

double IG.Lib.IColorScale.GetCellValue ( int  cellIndex)

Returns the value corresponding to the specified cell in the discrete color map. This value is used to obtain the uniform (discrete) color of the cell by the methods that produces continuous scale colors (continuous methods are usually basis for scale definitions).

Parameters
cellIndexIndex of the cell for which the corresponding characteristic value (usually in the middle of the cell interval) is returned.

Implemented in IG.Lib.ColorScaleBase.

color IG.Lib.IColorScale.GetCellColor ( int  cellIndex)

Returns the (discrete) color corresponding to the specified cell index. If the index is out of range then the lowest or the highest cell color is returned, dependent on whether the value is smaller than lower bound or greater than upper bound.

Parameters
cellIndexIndex of the discrete cell for which color is returned.

Implemented in IG.Lib.ColorScaleBase.

int IG.Lib.IColorScale.GetReferenceCellIndex ( double  referenceValue)

Retuns index of the cell of the discrete color scale that corresponds to the specified value in the reference domain (interval [0, 1]).

Parameters
referenceValueValue in the reference domain (interval [0, 1]) for wihich index of the discrete cell of the color scale is returned.

Implemented in IG.Lib.ColorScaleBase, and IG.Lib.ColorScale.

int IG.Lib.IColorScale.GetCellIndex ( double  value)

Retuns index of the cell of the discrete color scale that corresponds to the specified value (in the actusl domain).

Parameters
valueValue in the reference domain (interval [0, 1]) for wihich index of the discrete cell of the color scale is returned.

Implemented in IG.Lib.ColorScaleBase.

color IG.Lib.IColorScale.GetDiscreteReferenceColor ( double  referenceValue)

Returns a color from the DISCRETE color scale represented by the current object that corresponds to he specified value in the REFERENCE domain (interval [0, 1]).

Parameters
referenceValueValue in the reference domain (interval [0, 1]) for which the corresponding color from the discrete color scale is returned.

Implemented in IG.Lib.ColorScaleBase.

color IG.Lib.IColorScale.GetDiscreteColor ( double  value)

Returns a color from the DISCRETE color scale represented by the current object that corresponds to he specified value (in the actual domain).

Parameters
valueValue (in the actual domain) for which the corresponding color from the discrete color scale is returned.

Implemented in IG.Lib.ColorScaleBase.

Property Documentation

bool IG.Lib.IColorScale.IsDiscrete
get

Gets the flag indicating whether the color scale is discrete (with a finite number of possible colors, as opposed to continuous).

int IG.Lib.IColorScale.NumCells
getset

Number of cells in discrete color scale.

Remarks:

If less than 1 then the current object can not represent a discrete color scale, and the related methods such as should throw exception.

Minimal value is 1. If p or less is assigned then an exception is thrown.


The documentation for this interface was generated from the following file: