Kōtuku
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Config
    • Core
    • Display
    • Document
    • Font
    • HTTP
    • Network
    • Regex
    • SVG
    • Tiri
    • Vector
    • XML
    • XQuery
    • XRandR
      • Audio
      • MP3
      • Sound
      • File
      • MetaClass
      • Module
      • StorageDevice
      • Task
      • Thread
      • Time
      • Compression
      • CompressedStream
      • Config
      • LZMAStream
      • Script
      • Tiri
      • XML
      • XQuery
      • Controller
      • BlurFX
      • ColourFX
      • CompositeFX
      • ConvolveFX
      • DisplacementFX
      • FilterEffect
      • FloodFX
      • ImageFX
      • LightingFX
      • MergeFX
      • MorphologyFX
      • OffsetFX
      • RemapFX
      • SourceFX
      • TurbulenceFX
      • WaveFunctionFX
      • Scintilla
      • Bitmap
      • Clipboard
      • Display
      • Document
      • Font
      • Image
      • Pointer
      • Surface
      • SVG
      • ClientSocket
      • HTTP
      • NetClient
      • NetLookup
      • NetServer
      • NetSocket
      • Proxy
      • Gradient
      • GradientConic
      • GradientContour
      • GradientDiamond
      • GradientDiffusion
      • GradientDistal
      • GradientGouraud
      • GradientLinear
      • GradientMesh
      • GradientRadial
      • GradientVoronoi
      • Vector
      • VectorClip
      • VectorColour
      • VectorEllipse
      • VectorFilter
      • VectorGradient
      • VectorGroup
      • VectorImage
      • VectorPath
      • VectorPattern
      • VectorPolygon
      • VectorRectangle
      • VectorScene
      • VectorShape
      • VectorSpiral
      • VectorText
      • VectorTransition
      • VectorViewport
      • VectorWave
      • Linux Builds
      • Windows Builds
      • Customising Your Build
      • Kōtuku Objects
      • Kōtuku In Depth
      • Kōtuku Design Patterns
      • Coding With AI
      • Regex Manual
      • XML Comparisons
      • Tiri Reference Manual
      • Config API
      • Defer Syntax
      • GUI API
      • HTTP Server API
      • I/O API
      • JSON API
      • OAuth API
      • Options API
      • Proxy Server API
      • Tempus API
      • URL API
      • VFX API
      • Widgets
      • RIPL Reference Manual
      • Origo
      • Flute / Unit Testing
      • Tuku
      • Embedded Document Format
      • TDL Reference Manual
      • TDL Tools
      • Action Reference Manual
      • System Error Codes

CompositeFX Class

Composite two sources together with a mixing algorithm.

This filter combines the FilterEffect⇒Input and FilterEffect⇒Mix sources using either one of the Porter-Duff compositing operations, or a colour blending algorithm. The Input has priority and will be placed in the foreground for ordered operations such as ATOP and OVER.

Structure

The CompositeFX class consists of the following fields:

Access
NameTypeComment
 K1DOUBLEInput value for the arithmetic operation.
 K2DOUBLEInput value for the arithmetic operation.
 K3DOUBLEInput value for the arithmetic operation.
 K4DOUBLEInput value for the arithmetic operation.
 OperatorOPThe compositing algorithm to use for rendering.

Setting the Operator will determine the algorithm that is used for compositing. The default is OVER.

NameDescription
OP::ARITHMETICThe SVG 'arithmetic' blending algorithm.
OP::ATOPThe Porter-Duff 'atop' operator; the mix alpha channel has priority and the input channel does not occlude.
OP::BURNGives a darker result than MULTIPLY by increasing the contrast between the input and mix colours.
OP::CONTRASTAdjust the mix contrast using the input colour values as the contrast strength.
OP::DARKENUse the darker colour components of the mix and input values.
OP::DIFFERENCEOutput the difference between the input and mix colours.
OP::DODGEGives a brighter result than SCREEN by decreasing the contrast between the input and mix colours.
OP::EXCLUSIONProduce the difference between the mix and input values around a reference point of mid-grey.
OP::HARD_LIGHTApply MULTIPLY or SCREEN according to the input colour, producing a high-contrast result.
OP::INThe Porter-Duff 'in' operator; the input alpha channel has priority and the mix channel is secondary.
OP::INVERTInvert the mix colour components using the input alpha channel as the strength.
OP::INVERT_RGBInvert the mix colour components using the input colour channels as the per-channel strength.
OP::LIGHTENUse the lighter colour components of the mix and input values.
OP::MINUSThe input colour value is subtracted from the mix.
OP::MULTIPLYMultiplies the input and mix colour components, producing a darker result unless one source is white.
OP::OUTThe Porter-Duff 'out' operator; the mix alpha channel is inversed with the input channel.
OP::OVERThe Porter-Duff 'over' operator, this is the default operation for standard alpha blending.
OP::OVERLAYCombines the multiply and screen blend modes, with the mix determining tonal strength.
OP::PLUSAdd the input and mix colour values together.
OP::SCREENProduces a result brighter than the input.
OP::SOFT_LIGHTApply a softer variant of HARD_LIGHT, subtly darkening or lightening the mix from the input colour.
OP::XORThe Porter-Duff 'xor' operator; blend as normal but occlusion occurs when input and mix alpha channels interact.
 XMLDefSTRINGReturns an SVG compliant XML string that describes the filter.

Actions

The following actions are currently supported:

DrawRender the effect to the target bitmap.
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
ParameterDescription
XThe X position of the region to be drawn.
YThe Y position of the region to be drawn.
WidthThe width of the region to be drawn.
HeightThe height of the region to be drawn.
CompositeFX class documentation © Paul Manias © 2010-2026

OP Type

Operators for CompositionFX.

NameDescription
OP::ARITHMETICThe SVG 'arithmetic' blending algorithm.
OP::ATOPThe Porter-Duff 'atop' operator; the mix alpha channel has priority and the input channel does not occlude.
OP::BURNGives a darker result than MULTIPLY by increasing the contrast between the input and mix colours.
OP::CONTRASTAdjust the mix contrast using the input colour values as the contrast strength.
OP::DARKENUse the darker colour components of the mix and input values.
OP::DIFFERENCEOutput the difference between the input and mix colours.
OP::DODGEGives a brighter result than SCREEN by decreasing the contrast between the input and mix colours.
OP::EXCLUSIONProduce the difference between the mix and input values around a reference point of mid-grey.
OP::HARD_LIGHTApply MULTIPLY or SCREEN according to the input colour, producing a high-contrast result.
OP::INThe Porter-Duff 'in' operator; the input alpha channel has priority and the mix channel is secondary.
OP::INVERTInvert the mix colour components using the input alpha channel as the strength.
OP::INVERT_RGBInvert the mix colour components using the input colour channels as the per-channel strength.
OP::LIGHTENUse the lighter colour components of the mix and input values.
OP::MINUSThe input colour value is subtracted from the mix.
OP::MULTIPLYMultiplies the input and mix colour components, producing a darker result unless one source is white.
OP::OUTThe Porter-Duff 'out' operator; the mix alpha channel is inversed with the input channel.
OP::OVERThe Porter-Duff 'over' operator, this is the default operation for standard alpha blending.
OP::OVERLAYCombines the multiply and screen blend modes, with the mix determining tonal strength.
OP::PLUSAdd the input and mix colour values together.
OP::SCREENProduces a result brighter than the input.
OP::SOFT_LIGHTApply a softer variant of HARD_LIGHT, subtly darkening or lightening the mix from the input colour.
OP::XORThe Porter-Duff 'xor' operator; blend as normal but occlusion occurs when input and mix alpha channels interact.
CompositeFX module documentation © Paul Manias © 2010-2026