Table of Contents

Class RangeColorRule

Namespace
Hi.Coloring
Assembly
HiGeom.dll

Defines a rule for mapping numeric values to colors based on a range.

public class RangeColorRule : IMakeXmlSource, IGetRangeColorRule
Inheritance
RangeColorRule
Implements
Inherited Members
Extension Methods

Constructors

RangeColorRule()

Ctor.

public RangeColorRule()

RangeColorRule(double, double, RatioRgbFuncEnum)

Constructor with range and color function specification.

public RangeColorRule(double floor, double ceiling, RatioRgbFuncEnum ratioRgbFuncEnum = RatioRgbFuncEnum.NormalizedPositiveErf)

Parameters

floor double

The lower bound of the range.

ceiling double

The upper bound of the range.

ratioRgbFuncEnum RatioRgbFuncEnum

The function to map ratio values to RGB colors.

RangeColorRule(XElement)

Ctor.

public RangeColorRule(XElement src)

Parameters

src XElement

XML

Fields

RatioRgbFuncEnum

The function used to map ratio values to RGB colors.

public RatioRgbFuncEnum RatioRgbFuncEnum

Field Value

RatioRgbFuncEnum

Properties

Ceiling

Gets or sets the upper bound of the range.

public double Ceiling { get; set; }

Property Value

double

Floor

Gets or sets the lower bound of the range.

public double Floor { get; set; }

Property Value

double

XName

Name for XML IO.

public static string XName { get; }

Property Value

string

Methods

GetRangeColorRule()

Gets the range color rule.

public RangeColorRule GetRangeColorRule()

Returns

RangeColorRule

The range color rule.

GetRgb(double)

Gets the RGB color for a given value based on the range and color function.

public Vec3d GetRgb(double v)

Parameters

v double

The value to convert to a color.

Returns

Vec3d

RGB color vector.

MakeXmlSource(string, string)

Creates an XML representation of the object. This method may also generate additional resources such as related files.

public XElement MakeXmlSource(string baseDirectory, string relFile)

Parameters

baseDirectory string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

Returns

XElement

An XML element representing the object's state