g:image.addShadow Method
Adds a shadow effect to a g:image element.
Syntax
retVal = g:image.addShadow(
strColor,
intRadius,
intAlpha,
intDeltaX,
intDeltaY
)
Parameters
- strColor [in]
str A named Windows color (such as "Black") or a color in the format "Color(Alpha, R, G, B)" where theAlpha
,R
,G
, andB
values can range from 0 to 255. Note If using the "Color(Alpha, R, G, B)" specification, theAlpha
value is superfluous. The transparency of the shadow is set using the intAlpha parameter of addShadow described below. - intRadius [in]
int An integer that specifies the radius (or boundary), in pixels, that the shadow effect extends outward from the edge of the target element. - intAlpha [in]
int An integer that sets the transparency of the shadow effect. The value can range from 0 (transparent) to 100 (opaque). - intDeltaX [in]
int The offset, in pixels, from the leftmost edge of the target element. - intDeltaY [in]
int The offset, in pixels, from the rightmost edge of the target element.
Return Value
HRESULT
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The opacity of the target element must be set to a value of at least 1 for the shadow effect to be visible.
Examples
The following example demonstrates how to add a shadow effect to a g:image element.
\\ imgBackground is the value of the 'id' attribute for the g:background element.
var imgShadow = imgBackground.addImageObject("file://img.png", 0, 0);
imgShadow.addShadow("black", 50, 50, 0, 0);
See Also
Reference
Send comments about this topic to Microsoft
Build date: 2/24/2010
Build type: SDK