Compositor Filter

Internet Development Index

Displays new content of the object as a logical color combination of the new and original content. The color and alpha values of each version of the content are evaluated to determine the final color on the output image.

Syntax

HTML
<ELEMENT STYLE=
"filter:progid:DXImageTransform.Microsoft.Compositor(sProperties)"
... >
Internet Explorer 5.5 or later
Scripting
object.style.filter =
"progid:DXImageTransform.Microsoft.Compositor(sProperties)"
Internet Explorer 5.5 or later

Possible Values

sPropertiesString that specifies one or more properties exposed by the filter.

Members Table

AttributePropertyDescription
functionFunction Sets or retrieves the compositing operation to perform.
MethodDescription
apply Captures the initial display of an object's content for a transition.
play Plays the transition.

Remarks

This filter exposes a rich set of image composition functions that interact with the colors and transparency of the content of the input object. To create a static filter with a transition, follow these steps.

  1. Choose a function.

    Review the Function property for a description of the available composition functions. Set this property in the Compositor filter declaration for the object.

  2. Create Input A.

    Determine the content that the filtered object will initially display. The composition functions consider this as Input A.

  3. Use the apply method of the Compositor filter.

    This defines the content as Input A at the time you call the apply method.

  4. Create Input B.

    Change properties of the object—visibility, innerText, backgroundColor, or border—or the properties of its child elements. The composition functions consider the content, after all changes, as Input B.

  5. Use the play method of the Compositor filter.

    The displayed image updates to the output of the composite function.

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 processed 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.

Example

This example uses a select element to modify the Function property that is used for the filter.

<B>Compositor Function:</B>
<BR>
<SELECT ID=funcsel onchange="D1.filters.item(
'DXImageTransform.Microsoft.Compositor').Function =
this.options(selectedIndex).value;">
<OPTION value=0>0: Clear both sets of input.</OPTION>
<OPTION value=1>1: Show the minimum color from both sets of input.</OPTION>
<OPTION value=2>2: Show the maximum color from both sets of input.</OPTION>
<OPTION value=3>3: Show Input A only.</OPTION>
<OPTION value=4>4: Show Input A over Input B.</OPTION>
<OPTION value=5>5: Only show Input A inside the Input B render area.</OPTION>
<OPTION value=6>6: Only show Input A outside the Input B render area.</OPTION>
<OPTION value=7>7: Only show Input A and B inside Input B render area.</OPTION>
<OPTION value=8>8: Show Input A minus Input B.</OPTION>
<OPTION value=9>9: Show Input A plus Input B.</OPTION>
<OPTION value=10>10: Show Input A and clear wherever the input intersects.</OPTION>
<OPTION value=19>19: Show Input B only.</OPTION>
<OPTION value=20 selected>20: Show Input B over Input A.</OPTION>
<OPTION value=21>21: Only show Input B inside the Input A render area.</OPTION>
<OPTION value=22>22: Only show Input B outside the Input A render area.</OPTION>
<OPTION value=23>23: Only show Input A and B inside the Input A render area.</OPTION>
<OPTION value=24>24: Show Input B minus Input A.</OPTION>
<OPTION value=25>25: Show Input B plus Input A.</OPTION>
</SELECT>
This feature requires Microsoft® Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Applies To

A, ACRONYM, ADDRESS, B, BDO, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, CUSTOM, DD, DEL, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FONT, FORM, FRAME, hn, IFRAME, FRAMESET, I, INS, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, MARQUEE, MENU, NOBR, OL, OBJECT, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TEXTAREA, TH, TD, TT, U, UL, VAR, XMP

See Also

Scripting Filters, Filter Design Considerations