Parasol Framework
  • Gallery
  • API
  • Wiki
  • GitHub
    • Audio
    • Core
    • Display
    • Fluid
    • Font
    • Network
    • Vector
    • Audio
    • Sound
    • File
    • MetaClass
    • Module
    • StorageDevice
    • Task
    • Thread
    • Time
    • Compression
    • Config
    • Script
    • XML
    • Controller
    • BlurFX
    • ColourFX
    • CompositeFX
    • ConvolveFX
    • DisplacementFX
    • FilterEffect
    • FloodFX
    • ImageFX
    • LightingFX
    • MergeFX
    • MorphologyFX
    • OffsetFX
    • RemapFX
    • SourceFX
    • TurbulenceFX
    • WaveFunctionFX
    • Scintilla
    • ScintillaSearch
    • Bitmap
    • Clipboard
    • Display
    • Document
    • Font
    • Picture
    • Pointer
    • Surface
    • SVG
    • ClientSocket
    • HTTP
    • NetSocket
    • Proxy
    • Vector
    • VectorClip
    • VectorColour
    • VectorEllipse
    • VectorFilter
    • VectorGradient
    • VectorGroup
    • VectorImage
    • VectorPath
    • VectorPattern
    • VectorPolygon
    • VectorRectangle
    • VectorScene
    • VectorShape
    • VectorSpiral
    • VectorText
    • VectorTransition
    • VectorViewport
    • VectorWave

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.
  OperatorINTThe 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::BURN
OP::CONTRAST
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_LIGHT
OP::INThe Porter-Duff 'in' operator; the input alpha channel has priority and the mix channel is secondary.
OP::INVERT
OP::INVERT_RGB
OP::LIGHTENUse the lighter colour components of the mix and input values.
OP::MINUSThe input colour value is subtracted from the mix.
OP::MULTIPLY
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_LIGHT
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-2025

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::BURN
OP::CONTRAST
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_LIGHT
OP::INThe Porter-Duff 'in' operator; the input alpha channel has priority and the mix channel is secondary.
OP::INVERT
OP::INVERT_RGB
OP::LIGHTENUse the lighter colour components of the mix and input values.
OP::MINUSThe input colour value is subtracted from the mix.
OP::MULTIPLY
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_LIGHT
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-2025