mmf
Class GradientLayer

Object
  extended by common:Generic
      extended by mmf:Layer
          extended by mmf:GradientLayer
Direct Known Subclasses:
MMF_GradientLayer

class 
Layer:GradientLayer



Ultra Fractal Source

Toggle UF Source Code Display

 class GradientLayer(Layer) {
 public:
   import "common.ulb"
   ; <p>
   ; @param pparent typically 'this' from the parent or zero
   func GradientLayer(Generic pparent)
     Layer.Layer(pparent)
     if @f_grad==0
       m_Gradient = new @f_gradient(this)
     endif
   endfunc
   ; <p>
   ; @param clr the base color
   ; @param index the gradient index for the top colour
   ; @return layer merged color
   color func GradientMerge(color clr,float index)
     if @f_grad==0
       return FullMerge(clr, m_Gradient.GetColour(index))
     else
       return FullMerge(clr, gradient(index))
     endif
   endfunc
 private:
   MMF_UserGradient m_Gradient
 default:
   int param v_gradientlayer
     caption = "Version (GradientLayer)"
     default = 100
     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_gradientlayer < 100
   endparam
   int param f_grad
     caption = "Gradient to use"
     enum = "Custom Gradient" "UF's Gradient"
     default = 0
   endparam
   MMF_UserGradient param f_gradient
     caption = "Layer Gradient"
     default = MMF_Gradient101
     hint = "Allows you to customise the colours for this layer."
     visible = @f_grad==0
   endparam
 }
 


Constructor Summary
GradientLayer()
           
GradientLayer(Generic pparent)
          
 
Method Summary
 color GradientMerge(color clr, float index)
          
 
Methods inherited from class mmf:Layer
FullMerge, SolidMerge
 
Methods inherited from class common:Generic
GetParent
 
Methods inherited from class Object
 

Constructor Detail

GradientLayer

public GradientLayer(Generic pparent)

Parameters:
pparent - typically 'this' from the parent or zero

GradientLayer

public GradientLayer()
Method Detail

GradientMerge

public color GradientMerge(color clr,
                           float index)

Overrides:
GradientMerge in class Layer
Parameters:
clr - the base color
index - the gradient index for the top colour
Returns:
layer merged color