voltmx.filter Namespace
The voltmx.filter namespace provides your apps with the ability to create and manage filters for use with the Image widget. Information about the voltmx.filter namespace is presented in the following topics:
Functions
The voltmx.filter namespace provides the following function:
voltmx.filter.createFilter Function
Creates a new filter object for use with the Image widget.
Syntax
voltmx.filter.createFilter()
Example
var filterObj = voltmx.filter.createFilter();
Input Parameters
None.
Return Values
A new filter object.
Platform Availability
Available on iOS and Android.
Constants
The voltmx.filter namespace contains the following constants:
Android Filters
The following filters are available on Android devices.
Filter Name | Filter Type | Description |
---|---|---|
AdditionCompositing | voltmx.filter.ADDITION_COMPOSITING | This filter is available from Android 3.0 and above. |
BoxBlur | voltmx.filter.BOX_BLUR | Increase or decreases the blurriness of image. |
Brightness | voltmx.filter.BRIGHTNESS | Increases or decreases the brightness of an image. |
ClearCompositing | voltmx.filter.CLEAR_COMPOSITING | This filter is available from Android 3.0 and above. |
ColorClamp | voltmx.filter.COLOR_CLAMP | This filter clamps the colors of input image within the given range. |
ColorInversion | voltmx.filter.COLOR_INVERSION | Inverts the colors of given image. When this filter is applied, for each pixel having [R,G,B] components in given image, this filter inverts the color components of those pixels to [255-R, 255-G, 255-B]. Transparency or Alpha component is untouched |
ColorMatrix | voltmx.filter.COLOR_MATRIX | This filter transforms the colors of given image as per the input parameters |
DarkenCompositing | voltmx.filter.DARKEN_COMPOSITING | This filter is available from Android 3.0 and above. |
EdgeDetection | voltmx.filter.EDGE_DETECTION | Detects or Highlight the edges of given image. |
Emboss | voltmx.filter.EMBOSS | Applies an embossing effect for a given image. |
GaussianBlur | voltmx.filter.GAUSSIAN_BLUR | Spreads source pixels by an amount specified by a Gaussian distribution to increase the blurriness. Blurriness of this filter is smooth compared to BoxBlur. |
Greyscale | voltmx.filter.GREYSCALE | Converts given image to black & white or monochrome image. |
MultiplyCompositing | voltmx.filter.MULTIPLY_COMPOSITING | This filter is available from Android 3.0 and above. |
LightenCompositing | voltmx.filter.LIGHTEN_COMPOSITING | This filter is available from Android 3.0 and above. |
OverlayCompositing | voltmx.filter.OVERLAY_COMPOSITING | This filter is available from Android 3.0 and above. |
SourceAtopCompositing | voltmx.filter.SOURCE_ATOP_COMPOSITING | This filter is available from Android 3.0 and above. |
ScreenCompositing | voltmx.filter.SCREEN_COMPOSITING | This filter is available from Android 3.0 and above. |
Sharpen | voltmx.filter.SHARPEN | Increases the sharpness of image. |
SourceInCompositing | voltmx.filter.SOURCE_IN_COMPOSITING | This filter is available from Android 3.0 and above. |
SourceOutCompositing | voltmx.filter.SOURCE_OUT_COMPOSITING | This filter is available from Android 3.0 and above. |
SourceOverCompositing | voltmx.filter.SOURCE_OVER_COMPOSITING | This filter is available from Android 3.0 and above. |
XorCompositing | voltmx.filter.XOR_COMPOSITING | This filter is available from Android 3.0 and above. |
Filter Input Parameters
The filter object uses the following input parameters.
Parameter | Description |
---|---|
inputImage | Image object |
inputRadius | Floating point number |
inputMask | Masking image |
inputAngle | Floating point number |
inputNoiseLevel | Floating point number |
inputCenter | Array of two values defining the (x,y) location of the center |
inputScale | Floating point number |
inputAmount | Floating point number |
inputSharpness | Floating point number |
inputMinComponents | Array of four floating values |
inputMaxComponents | Array of four floating values |
inputSaturation | Floating point number |
inputBrightness | Floating point number |
inputIntensity | Floating point number |
inputContrast | Floating point number |
inputRVector | Array of four floats |
inputGVector | Array of four floats |
inputBVector | Array of four floats |
inputAVector | Array of four floats |
inputBiasVector | Array of four floats |
inputRedCoefficients | Array of four floats |
inputGreenCoefficients | Array of four floats |
inputBlueCoefficients | Array of four floats |
inputAlphaCoefficients | Array of four floats |
inputEV | Floating point number |
inputPower | Floating point number |
inputNeutral | Array of two floating point numbers |
inputTargetNeutral | Array of two floating point numbers |
inputPoint0 | Array of two floating point numbers |
inputPoint1 | Array of two floating point numbers |
inputPoint2 | Array of two floating point numbers |
inputPoint3 | Array of two floating point numbers |
inputPoint4 | Array of two floating point numbers |
inputColor | Array of four numbers representing the color |
inputRedCoefficients | Array of ten floating point numbers |
inputGreenCoefficients | Array of ten floating point numbers |
inputBlueCoefficients | Array of ten floating point numbers |
inputGradientImage | Gradient Image |
inputBackgroundImage | Background Image |
inputLevels | Floating point number |
inputColor0 | Array of four hex numbers representing the color |
inputColor1 | Array of four hex numbers representing the color |
inputInsetPoint0 | Array of two floating point numbers |
inputInsetPoint1 | Array of two floating point numbers |
inputStrands | Floating point number |
inputPeriodicity | Floating point number |
inputRotation | Floating point number |
inputZoom | Floating point number |
inputDisplacementImage | Image object |
inputTexture | Image object |
inputRefraction | Floating point number |
inputCropAmount | Floating point number |
inputCenterStretchAmount | Floating point number |
inputWidth | Floating point number |
inputTransform | Array of nine floats representing the transform |
inputRectangle | Array of four floating point numbers |
inputAspectRatio | Floating point number |
inputTopLeft | Array of two floating point numbers |
inputTopRight | Array of two floating point numbers |
inputBottomRight | Array of two floating point numbers |
inputBottomLeft | Array of two floating point numbers |
inputExtent | Array of four floating point numbers |
inputRadius0 | Floating point number |
inputRadius1 | Floating point number |
inputGCR | Floating point number |
inputUCR | Floating point number |
inputCount | Integer |
inputHeight | Floating point number |
inputHighLimit | Floating point number |
inputLowLimit | Floating point number |
inputMaskImage | Masking image |
inputWeights | Array of floating point numbers |
inputBias | Floating point number |
inputUnsharpMaskRadius | Floating point number |
inputUnsharpMaskIntensity | Floating point number |
inputHighlightAmount | Floating point number |
inputShadowAmount |