Use the Matrix filter to create the following simple effects.
- Flip horizontal. Negate the M11 and M12 entry values.
- Flip vertical. Negate the M21 and M22 entry values.
- Resize. Multiply each matrix entry by the same factor. The content size changes in proportion to the multiple used. See the following examples.
- Rotate. Adjust the default matrix entries by the appropriate trigonometry function. See the following examples.
These effects are possible through the use of linear transforms. The Matrix filter creates a linear transformation of the displayed content with a 2x2 matrix augmented by a linear vector. Maximizing the effects available with the linear transform matrix requires a thorough understanding of linear algebra. However, for the simple functions described previously, no linear algebra is required.
The final image produced by the Matrix filter is an interpolation of the previous content. Using the padding property minimizes the chance of clipping at the edge of the final image.
The object that the filter is applied to must have layout before the filter effect displays. You can give the object layout by setting the height or width property, setting the position property to absolute, setting the writingMode property to tb-rl, or setting the contentEditable property to true.
You can assign multiple filters or transitions to an object by declaring each in the filter property of the object. The following div declaration assigns two filters and a Wheel transition to a div element.
<DIV STYLE="width:100%; filter:
progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310)
progid:DXImageTransform.Microsoft.Blur(pixelradius=2)
progid:DXImageTransform.Microsoft.Wheel(duration=3);">
Blurry text with smudge of gray.</div>
When multiple filters are applied to an object, each filter is process in source order, with the exception of
procedural surfaces, which are computed first. To emphasize a filter's effect, place it last in source order or on the object's parent. Always place transitions last in source order.