Share via


text.addShadow method

[The Windows Gadget Platform/Sidebar is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. ]

Adds a shadow effect to a g:text element.

Syntax

iRetVal = text.addShadow(
  strColor,
  intRadius,
  intAlpha,
  intDeltaX,
  intDeltaY
)

Parameters

strColor [in]

A named Windows color (such as "Black") or a color in the format "Color(Alpha, R, G, B)" where the Alpha, R, G, and B values can range from 0 to 255.

Note

If using the "Color(Alpha, R, G, B)" specification, the Alpha value is superfluous. The transparency of the shadow is set using the intAlpha parameter of addShadow described below.

intRadius [in]

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]

An integer that sets the transparency of the shadow effect. The value can range from 0 (transparent) to 100 (opaque).

intDeltaX [in]

The offset, in pixels, from the leftmost edge of the target element.

intDeltaY [in]

The offset, in pixels, from the rightmost edge of the target element.

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:text element.

\\ imgBackground is the value of the 'id' attribute for the g:background element.
var txtShadow = imgBackground.addTextObject("test", "Verdana", 25, "Red", 50, 50);
txtShadow.addShadow("Color(255, 255, 0, 0)", 50, 25, 0, 0);

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
End of client support
Windows 7
End of server support
Windows Server 2008
IDL
Sidebar.idl
DLL
Sidebar.Exe (version 1.00 or later)

See also

Reference

image

text