
Visual Filters allow you to manipulate the display of other visible objects, with any of several predefined filter effects. This section describes the specific filter effects.
Sets the level of opacity for your visual object. The opacity can be set as uniform or graded, in a linear or radial fashion.
{ FILTER: Alpha(Opacity=opacity, FinishOpacity=finishopacity, Style=style, StartX=startX, StartY=startY, FinishX=finishX, FinishY=finishY)"}
Parameter Description opacity Level of the opacity. 0, the default, is fully transparent; 100 is fully opaque. finishopacity (Optional) Ranges from 0 (fully transparent) to 100 (fully opaque). style Specifies the shape characteristics of the opacity gradient. Possible values are 0 (uniform), 1 (linear), 2 (radial), or 3 (rectangular). startX X coordinate for opacity gradient to begin. startY Y coordinate for opacity gradient to begin. finishX X coordinate for opacity gradient to end. finishY Y coordinate for opacity gradient to end.
Averages the pixels of the visible object for a specified length and direction, creating the impression that the object is moving at high speed.
{FILTER: Blur(Add=add, Direction=direction, Strength=strength)}
Parameter Description add Boolean switch specifying whether to add the original image to the motion-blurred image. If true (nonzero integer), the image is added to the motion blurred image; if false (zero), the image is not added to the motion blurred image. direction Direction of the motion blur clockwise from the vertical orientation of the object, rounded to 45-degree increments. The default value is 0 (straight up). Possible values are shown in the following table.
Value Description 0 Top 45 Top right 90 Right 135 Bottom right 180 Bottom 225 Bottom left 270 Left 315 Top left strength Long value that specifies the number of pixels the blur will extend.
You can create a nice effect for fonts by setting add to 1.
For the direction parameter, negative values or values larger than 360 degrees will wrap around to their equivalent angle (for example, -45 degrees is equivalent to 315-degree orientation). This allows mathematical manipulations to be carried out easily in code.
Selectively renders a specific color transparent for the selected visual object.
{FILTER: Chroma(Color=color)}
Parameter Description color Value of the color to be subject to chromakey transparency. Color is expressed in #RRGGBB format, where RR is the red hexadecimal value, GG is the green hexadecimal value, and BB is the blue hexadecimal value.
This effect is not recommended for files that have been dithered from 24 to 8 bit. In particular, JPEG files, as dithered and compressed files, do not produce an entirely solid chromakey color, resulting in uneven effects. Chromakey doesn't work well on anti-aliased sources, in which sharp lines are smoothed by blending the colors of surrounding pixels. Choosing a specific chromakey color will cause some colors that would otherwise be transparent to be fully opaque.
Paints a solid silhouette of the selected visual object, offset in the specified direction. This creates the illusion that the visual object is floating above the page and is casting a shadow onto the page.
{FILTER: DropShadow(Color=color, OffX=offX, OffY=offY, Positive=positive)}
Parameter Description color Specific color for the drop shadow effect. Color is expressed in #RRGGBB format, where RR is the red hexadecimal value, GG is the green hexadecimal value, and BB is the blue hexadecimal value. offX Number of pixels the drop shadow is offset from the visual object, along the x-axis. Expressed in integers. Positive integers move the drop shadow to the right. Negative integers move the drop shadow to the left. offY Number of pixels the drop shadow is offset from the visual object, along the y-axis. Expressed in integers. Positive integers move the drop shadow down. Negative integers move the drop shadow up. positive Boolean. A true (nonzero) value, the default, creates a drop shadow of any nontransparent pixel of the visual object. If false (zero), drop shadows are created for any transparent pixel of the visual object.
If you have a transparent object but still want the usual shadow effect, set positive to zero. The transparent object will have a drop shadow outside the transparent region, rather than a drop shadow inside the transparent region.
Renders the visual object as a mirror image of itself along the horizontal plane.
{FILTER: FlipH}
Renders the visual object as a mirror image of itself along the vertical plane.
{FILTER: FlipV}
Adds radiance around the outside edges of the object, giving it the appearance of a glow.
{FILTER: Glow(Color=color, Strength=strength)}
Parameter Description color Specific color for the shadow effect. Color is expressed in the #RRGGBB format, where RR is the red value, GG is the green value, and BB is the blue value. strength Intensity of the glow. 1255.
Drops the color information from the visual object's color palette, rendering the object in grayscale.
{FILTER: Gray}
Reverses the hue, saturation, and brightness values of the visual object.
{FILTER: Invert}
Simulates the projection of a light source onto the selected visual object.
{FILTER: Light}
Once you have defined your Light Filter effect collection for your object, you call its methods to set or change its properties.
Light Filter method Description AddAmbient Method Adds ambient light source. AddCone Method Adds cone light source. AddPoint Method Adds point light source. ChangeColor Method Changes light color. ChangeStrength Method Changes light strength. Clear Method Clears all lights. MoveLight Method Moves light source. You can control the virtual position of the light source, the x and y coordinates of the focus of the light, the type of light (point or cone) and whether the light has hard or diffuse edges, the color of the light, and its intensity. The maximum number of lights available to each Visual Filter control is 10, so to add more than 10 lights to your page, you will need multiple Visual Filter controls.
When a light effect is created, it has a default ambient light associated with it. The first light you add to the object replaces this default ambient light.
You can associate only one object per light effect. To light several different separate objects (for example, a text phrase and a bitmap image), you need a separate instance of the Lights Filter effect for each object. However, if you combine several objects into a single object by using a DIV tag, you can use one light object to light the combined object.
Takes the selected visual object, paints the transparent pixels a specific color, and makes a transparent mask from its nontransparent pixels.
{FILTER: Mask(Color=color)}
Parameter Description color Color that the transparent regions are painted. Color is expressed in #RRGGBB format, where RR is the red hexadecimal value, GG is the green hexadecimal value, and BB is the blue hexadecimal value.
Paints a solid silhouette of the selected visual object along one of its edges, in the specified direction. This creates the illusion of a shadow around the visual object.
{FILTER: Shadow(Color=color, Direction=direction)}
Parameter Description color Specific color for the shadow effect. Color is expressed in #RRGGBB format, where RR is the red hexadecimal value, GG is the green hexadecimal value, and BB is the blue hexadecimal value. direction Directional offset for the shadow effect. Direction is expressed in terms of degrees clockwise from vertical orientation of the object, in 45-degree increments. The default orientation is 225 degrees, which places the shadow to the bottom left side of the object.
Value Description 0 Top 45 Top right 90 Right 135 Bottom right 180 Bottom 225 Bottom left 270 Left 315 Top left
For the direction parameter, negative values or values larger than 360 degrees will wrap around to their equivalent angle (for example, -45 degrees is equivalent to 315-degree orientation). This allows mathematical manipulations to be carried out easily in code.
Performs a sine wave distortion of the visual display of the object along the vertical axis.
{FILTER: Wave(Add=add, Freq=freq, LightStrength=strength, Phase=phase, Strength=strength)}
Parameter Description add Boolean. If true (nonzero value), adds the original image to the waved image. If false (0), it does not. freq Number of waves to appear in the visual distortion. Integer. light Strength of the light on the wave effect in percent, from 0 to 100. phase Phase offset for the start of the sine wave effect, which is normally 0 degrees. Value between 0 and 100, which expresses the percentage of the wavelength at which offset should start. For example, a value of 25 starts sine wave effect at 90 degrees. A value of 360 is the equivalent of 0. strength Intensity of the wave effect.
Using a sequencer to change the phase parameter can create some interesting effects.
Changes the color depth of the visual object and renders the object in black and white, making the visual display look like a black and white x-ray.
{FILTER: Xray}
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.