Export (0) Print
Expand All

g:text.addGlow Method

Adds a glow effect to a g:text element.

Syntax

retVal = g:text.addGlow(
  strColor,
  intRadius,
  intAlpha
)

Parameters

strColor [in]
str

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 glow is set using the intAlpha parameter of addGlow described below.

intRadius [in]
int

An integer that specifies the radius (or boundary), in pixels, that the glow effect extends outward from the edge of the target element.

intAlpha [in]
int

An integer that sets the transparency of the glow effect as a percentage from 0 (transparent) to 100 (opaque).

Return Value

HRESULT

If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

The opacity of the target text must be set to a value of at least 1 for the glow effect to be visible.

Examples

The following example demonstrates how to add a glow effect to a g:text element.

\\ imgBackground is the value of the 'id' attribute for the g:background element.
var txtGlow = imgBackground.addTextObject("test", "Verdana", 25, "Red", 50, 50);
txtGlow.opacity = 100;
txtGlow.addGlow("black", 50, 50);

See Also

Reference
image
text

 

 

Send comments about this topic to Microsoft

Build date: 2/24/2010

Build type: SDK

Community Additions

Show:
© 2014 Microsoft