dmj5
Class DMJ_FastNormalMerge
Object
common:Generic
common:ColorMerge
dmj5:DMJ_FastNormalMerge
class
- ColorMerge:DMJ_FastNormalMerge
This color blend class only does Normal merge mode, but it supports IsOpaque() for speed optimizations.
Ultra Fractal Source
Toggle UF Source Code Display
class DMJ_FastNormalMerge(common.ulb:ColorMerge) {
; This color blend class only does Normal merge mode, but it supports IsOpaque() for speed optimizations.
public:
func DMJ_FastNormalMerge(Generic pparent)
ColorMerge.ColorMerge(pparent)
endfunc
color func Merge(color pbottom, color ptop)
return mergenormal(pbottom, ptop)
endfunc
bool func IsOpaque(color ptop)
return (alpha(ptop) == 1.0)
endfunc
default:
title = "Fast Normal Merge"
int param v_dmj_fastnormalmerge
caption = "Version (DMJ_FastNormalMerge)"
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_dmj_fastnormalmerge < 100
endparam
}
Methods inherited from class Object |
|
DMJ_FastNormalMerge
public DMJ_FastNormalMerge(Generic pparent)
DMJ_FastNormalMerge
public DMJ_FastNormalMerge()
Merge
public color Merge(color pbottom,
color ptop)
- Description copied from class:
ColorMerge
- Color merging function
- Overrides:
Merge
in class ColorMerge
- Parameters:
pbottom
- color on the bottomptop
- color on the top
- Returns:
- merged color; alpha value should be from the top color or composing won't work right
IsOpaque
public boolean IsOpaque(color ptop)
- Description copied from class:
ColorMerge
- Opaque test function
In some cases, formulas want to know if, given a particular
color, merging it onto another color will leave any of the
other color visible (i.e. does all the color come from the
top color). This function should return true in that case.
The default implementation always returns false; if you
write a merging class which can identify opaque colors, you
should override this function. (Note this isn't as simple
as just looking at the top color's opacity; in non-Normal
merge modes the bottom color still influences the output.)
- Overrides:
IsOpaque
in class ColorMerge
- Parameters:
ptop
- top color to test
- Returns:
- true if top color is fully opaque