reb
Class ImageTrapColoringIteration
Object
common:Generic
reb:ImageTrapColoring
reb:ImageTrapColoringIteration
class
- ImageTrapColoring:ImageTrapColoringIteration
Returns a value based upon the iteration # which has been weighted by a texture
An option for returning a modulus of the interation # is also available.
The inherited function CResult() returns a color from a ColorTrap class
if one is being used.
Ultra Fractal Source
Toggle UF Source Code Display
class ImageTrapColoringIteration(ImageTrapColoring) {
; Returns a value based upon the iteration # which has been weighted by a texture <br>
; <p>
; An option for returning a modulus of the interation # is also available.
; The inherited function CResult() returns a color from a ColorTrap class
; if one is being used.
public:
import "common.ulb"
; constructor
func ImageTrapColoringIteration(Generic pparent)
ImageTrapColoring.ImageTrapColoring(pparent)
endfunc
; use in the Result section of a direct coloring formula.
float func Result(ImageTrapMode ptrapmode)
ImageTrapColoring.Result(ptrapmode)
if @discrete == "discrete colors"
return (ptrapmode.GetIteration(0) % @modcolor)/@modcolor + ptrapmode.GetTexture(0)
else
return ptrapmode.GetIteration(0)*0.01 + ptrapmode.GetTexture(0)
endif
endfunc
default:
title = "Iteration"
int param v_imagetrapiteration
caption = "Version (image Trap Iteration)"
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_imagetrapiteration < 100
endparam
param discrete
caption = "Iteration options"
default = 0
enum = "normal" "discrete colors"
hint = "'discrete colors' allows the user to set the total number of colors \
to use with mod iter."
endparam
int param modcolor
caption = "# of iteration colors"
default = 8
visible = @discrete == "discrete colors"
hint = "Number of iteration colors to use with mod iter. This is useful \
for gradient masks where the mask allows a specific mod iter to \
be opaque or transparent."
endparam
}
Method Summary |
float |
Result(ImageTrapMode ptrapmode)
use in the Result section of a direct coloring formula. |
Methods inherited from class Object |
|
ImageTrapColoringIteration
public ImageTrapColoringIteration(Generic pparent)
- constructor
ImageTrapColoringIteration
public ImageTrapColoringIteration()
Result
public float Result(ImageTrapMode ptrapmode)
- use in the Result section of a direct coloring formula.
- Overrides:
Result
in class ImageTrapColoring