The OpenD Programming Language

colourGradient

Function returning a colourgradient function based on a specified ColourGradient

  1. ColourGradientFunction colourGradient(ColourGradient!T cg, bool absolute)
    colourGradient
    (
    T
    )
    (,
    bool absolute = false
    )
  2. ColourGradientFunction colourGradient(string name)

Parameters

cg ColourGradient!T

A ColourGradient

absolute bool

Whether the cg is an absolute scale or relative (between 0 and 1)

Examples

auto cg = ColourGradient!HCY();
cg.put( 0, HCY(200, 0.5, 0) ); 
cg.put( 100, HCY(200, 0.5, 0) ); 
GGPlotD().put( colourGradient( cg ) );

Meta