Compartir a través de


MaskColor Property

Sets or retrieves the color used to mask transparent content of an object.

Syntax

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

Possible Values

iColor Integer that specifies or receives one of the following values:
0x00000000 - 0xFFFFFFFF
32-bit ARGB format color values.
0x00000000
Default. Opaque black.

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

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