Provides pixel remapping; equivalent to feComponentTransfer in SVG.
The RemapFX class provides an implementation of the feComponentTransfer
functionality in SVG.
Internally the pixel rendering process is implemented using pixel lookup tables. As such this particular effect carries minimal overhead compared to most other effect classes.
The RemapFX class consists of the following fields:
Access | Name | Type | Comment |
---|---|---|---|
XMLDef | STRING | Returns an SVG compliant XML string that describes the filter. |
The following actions are currently supported:
Name | Comment | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Draw | Render the effect to the target bitmap. | |||||||||||
ERR acDraw(*Object, DOUBLE X, DOUBLE Y, DOUBLE Width, DOUBLE Height)
|
The following methods are currently supported:
Name | Comment | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
SelectDiscrete | Apply the discrete function to a pixel component. | ||||||||||
ERR rf::SelectDiscrete(OBJECTPTR Object, CMP Component, DOUBLE * Values, LONG Size)
This method will apply the table function to a selected RGBA pixel component. A list of values is required with a minimum size of 1. | |||||||||||
SelectGamma | Apply the gamma function to a pixel component. | ||||||||||
ERR rf::SelectGamma(OBJECTPTR Object, CMP Component, DOUBLE Amplitude, DOUBLE Offset, DOUBLE Exponent)
This method will apply the gamma function to a selected RGBA pixel component. The gamma function is written as | |||||||||||
SelectIdentity | Apply the identity function to a pixel component. | ||||||||||
ERR rf::SelectIdentity(OBJECTPTR Object, CMP Component)
Selecting the identity function for a pixel component will render it as its original value. By default, all pixels will use this function if no other option is chosen. | |||||||||||
SelectInvert | Apply the invert function to a pixel component. | ||||||||||
ERR rf::SelectInvert(OBJECTPTR Object, CMP Component)
This method will apply the invert function to a selected RGBA pixel component. The function is written as This feature is not compatible with SVG. | |||||||||||
SelectLinear | Apply the linear function to a pixel component. | ||||||||||
ERR rf::SelectLinear(OBJECTPTR Object, CMP Component, DOUBLE Slope, DOUBLE Intercept)
This method will apply the linear function to a selected RGBA pixel component. The function is written as | |||||||||||
SelectMask | Apply the mask function to a pixel component. | ||||||||||
ERR rf::SelectMask(OBJECTPTR Object, CMP Component, LONG Mask)
This method will apply the mask function to a selected RGBA pixel component. The function is written as This feature is not compatible with SVG. | |||||||||||
SelectTable | Apply the table function to a pixel component. | ||||||||||
ERR rf::SelectTable(OBJECTPTR Object, CMP Component, DOUBLE * Values, LONG Size)
This method will apply the table function to a selected RGBA pixel component. A list of values is required with a minimum size of 1. If a single table value is supplied then the component will be output as a constant with no interpolation applied. |
Component selection for RemapFX methods.
Name | Description |
---|---|
CMP::ALL | All colour channels. |
CMP::ALPHA | The alpha channel. |
CMP::BLUE | The blue colour channel. |
CMP::GREEN | The green colour channel. |
CMP::RED | The red colour channel. |
Class Info | |
---|---|
ID | ID_REMAPFX |
Category | Graphics |
Include | modules/remapfx.h |
Version | 1 |