< Previous | Contents | Next >

attributes (table, required)

A table containing entries which describe how the foreground will be merged over the background. All values are optional, and an empty table will perform a default Additive merge of the foreground over the background. Valid entries include:


MO_EdgeMode

"Black" "Canvas" "Wrap" "Duplicate"

MO_ApplyMode

"Normal" "Merge" "Screen" "Dissolve" "Darken" "Multiply" "ColorBurn" "LinearBurn" "Darker Color" "Lighten" "ColorDodge" "LinearDodge" "LighterColor" "Overlay" "SoftLight" "HardLight" "VividColor" "LinearLight" "PinLight" "Difference" "Exclusion" "Hue" "Saturation" "Color" "Luminosity" "Hypotenuse" "Geometric"

MO_ApplyOperator

"Over" "In" "HeldOut" "Atop" "XOr" "Conjoint" "Disjoint" "Mask" "Stencil" "Under"

MO_DoZ

MO_UseOpenGL

MO_MustDoCopy

MO_BBoxOnly

MO_FgZOffset

MO_BgZOffset

MO_XOffset

MO_YOffset

MO_XAxis

MO_YAxis

MO_XSize

MO_YSize

MO_Angle

MO_FgAddSub

MO_BgAddSub


MO_BurnIn

MO_FgRedGain

MO_FgGreenGain

MO_FgBlueGain

MO_FgAlphaGain

MO_BgAlphaGain


Example


This simple example additively merges the FG over the BG and provides no further options.

FuRegisterClass("SimpleMerge", CT_Tool, { REGS_Category = "Fuses\\Samples", REGS_OpIconString = "SMrg", REGS_OpDescription = "Simple Merge",

})


function Create()


InBackground = self:AddInput("Background", "Background", { LINKID_DataType = "Image",

LINK_Main = 1,

})


InForeground = self:AddInput("Foreground", "Foreground", { LINKID_DataType = "Image",

LINK_Main = 2,

})


OutImage = self:AddOutput("Output", "Output", { LINKID_DataType = "Image",

LINK_Main = 1,

})

end


function Process(req)

local bg = InBackground:GetValue(req) local fg = InForeground:GetValue(req)


local out = bg:Copy()

out:Merge(fg, {MO_ApplyMode = "Merge"})


OutImage:Set(req, out)

end