feDisplacementMap element | SVGFEDisplacementMapElement object
Spatially displaces an image (in) using the pixel values of a second image (in2). The transformation uses the equation: P'(x,y) <- P( x + scale * ((XC(x,y) - .5), y + scale * (YC(x,y) - .5)) where P(x,y) is the source image, image1, and P'(x,y) is the destination. XC(x,y) and YC(x,y) are the component values of the designated by the x-channel-selector and y-channel-selector. For example, to use the red (R) component of image2 to control displacement in x and the green (G) component of image2 to control displacement in y, set x-channel-selector to "R" and y-channel-selector to "G". The displacement map defines the inverse of the mapping performed.
![]() ![]() |
Syntax
<feDisplacementMap xChannelSelector="G" yChannelSelector="B" in2="image2" in="image1"/>
DOM Information
Inheritance Hierarchy
Members
The SVGFEDisplacementMapElement object has these types of members:
Properties
The SVGFEDisplacementMapElement object has these properties.
| Property | Access type | Description |
|---|---|---|
|
Gets or sets the height of an element. | ||
| Read-only |
Identifies input for the given filter primitive. | |
| Read-only |
The second input image to the blending operation. | |
| Read-only |
Provides a reference for the output result of a filter. | |
|
Defines the width of an element. | ||
|
Gets or sets the x-coordinate value. | ||
| Read-only |
Specifies which color channel (R/G/B/A) from image 2 to use for the x displacement property with a FEDisplacementMap element. | |
|
Gets or sets the y-coordinate value. | ||
| Read-only |
Specifies which color channel (R/G/B/A) from image 2 to use for the y displacement property with a FEDisplacementMap element. |
Standards information
- Scalable Vector Graphics: Filter Effects, Section 15.25.17
See also

