Partilhar via


Mask Property

Sets or retrieves whether transparent content of an object is changed to the MaskColor value.

Syntax

HTML
N/A
Scripting
object.filters.item(
    "DXImageTransform.Microsoft.BasicImage").Mask [ = bMask ]

Possible Values

bMask Boolean that specifies or receives one of the following values.
1
Transparent content is changed to the MaskColor value.
0
Default. Display content with normal RGB values.

The property is read/write. The property has a default value of 0.

Example

This sample sets the BasicImage filter to mask the content of a DIV element.

<!-- This DIV is the target container for an image.  -->        
    <DIV ID="oDiv" STYLE="position:absolute; left:270px;filter:
        progid:DXImageTransform.Microsoft.BasicImage(mask=1)" >
        An Image - >    
        <IMG SRC='/workshop/graphics/earglobe.gif' />
    </DIV>
<BUTTON onclick=" oDiv.filters.item(0).MaskColor = 0Xff0000">
    Red Mask</BUTTON><BR/>
<BUTTON onclick=" oDiv.filters.item(0).MaskColor = 0X00ff00">
    Green Mask</BUTTON><BR/>
<BUTTON onclick=" oDiv.filters.item(0).MaskColor = 0X0000ff">
    Blue Mask</BUTTON><BR/>

Applies To

BasicImage