Combines multiple effects in sequence.
Use MergeFX to composite multiple input sources so that they are rendered on top of each other in a predefined sequence.
Many effects produce a number of intermediate layers in order to create the final output image. This filter allows us to collapse those into a single image. Although this could be done by using n-1 Composite-filters, it is more convenient to have this common operation available in this form, and offers the implementation some additional flexibility.
The MergeFX class consists of the following fields:
Access | Name | Type | Comment |
|---|---|---|---|
| SourceList | MergeSource[] | A list of source types to be processed in the merge. | |
The list of sources is built as a simple array of MergeSource structures. Input sources are defined by the SourceType field value. In the case of | |||
| XMLDef | STRING | Returns an SVG compliant XML string that describes the filter. | |
The following actions are currently supported:
| Draw | Render the effect to the target bitmap. | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
| ||||||||||||
Filter source types - these are used internally
| Name | Description |
|---|---|
| VSF::ALPHA | As for GRAPHIC except that only the alpha channel is used. |
| VSF::BKGD | An image snapshot of the SVG document under the filter region at the time that the filter element was invoked. |
| VSF::BKGD_ALPHA | As for BKGD but only the alpha channel is used. |
| VSF::FILL | The value of the fill property on the target element for the filter effect. |
| VSF::GRAPHIC | Represents the graphics elements that were the original input into the filter element. |
| VSF::IGNORE | The filter does not require an input source. |
| VSF::PREVIOUS | Use the previous effect as input, or source graphic if no previous effect. |
| VSF::REFERENCE | This value is an assigned name for the filter primitive in the form of a custom-ident. If supplied, then graphics that result from processing this filter primitive can be referenced by an in attribute on a subsequent filter primitive within the same filter element. If no value is provided, the output will only be available for re-use as the implicit input into the next filter primitive if that filter primitive provides no value for its in attribute. |
| VSF::STROKE | The value of the stroke property on the target element for the filter effect. |
Input source declaration for MergeFX
| Field | Type | Description |
|---|---|---|
| SourceType | VSF | The type of the required source. |
| Effect | objFilterEffect * | Effect pointer if the SourceType is REFERENCE. |