common
Class GradientWrapper

Object
  extended by common:Generic
      extended by common:GradientWrapper
Direct Known Subclasses:
DefaultGradient, KCC_ColorMapBase

class 
Generic:GradientWrapper

GradientWrapper base class.

This class has a simple job: to convert a real index value to a color. The base implementation does this using UF's native gradient() function.


Ultra Fractal Source

Toggle UF Source Code Display

 class GradientWrapper(Generic) {
   ; GradientWrapper base class.
   ; <p>
   ; This class has a simple job: to convert a real index
   ; value to a color. The base implementation does this
   ; using UF's native gradient() function.
   
 public:
   ; Constructor
   ;
   ; @param pparent a reference to the object creating the new object; typically, 'this'
   func GradientWrapper(Generic pparent)
     Generic.Generic(pparent)
   endfunc
 
   ; Lookup function for code that does not support
   ; multiple channels; by default, use channel 0
   color func getColor(float pindex)
     return getColorChannel(pindex, 0)
   endfunc
 
   ; Lookup function supporting multiple channels
   ; By default, we use the UF gradient
   color func getColorChannel(float pindex, int pchannel)
     return gradient(pindex)
   endfunc
 
 default:
   int param v_gradientwrapper
     caption = "Version (GradientWrapper)"
     default = 101
     hint = "This version parameter is used to detect when a change has been made to the formula that is incompatible with the previous version. When that happens, this field will reflect the old version number to alert you to the fact that an alternate rendering is being used."
     visible = @v_gradientwrapper < 100
   endparam
 }
 


Constructor Summary
GradientWrapper()
           
GradientWrapper(Generic pparent)
          Constructor
 
Method Summary
 color getColor(float pindex)
          Lookup function for code that does not support multiple channels; by default, use channel 0
 color getColorChannel(float pindex, int pchannel)
          Lookup function supporting multiple channels By default, we use the UF gradient
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

GradientWrapper

public GradientWrapper(Generic pparent)
Constructor

Parameters:
pparent - a reference to the object creating the new object; typically, 'this'

GradientWrapper

public GradientWrapper()
Method Detail

getColor

public color getColor(float pindex)
Lookup function for code that does not support multiple channels; by default, use channel 0


getColorChannel

public color getColorChannel(float pindex,
                             int pchannel)
Lookup function supporting multiple channels By default, we use the UF gradient