DrawTextBox Method

See Also     Examples     Applies To

Draws aligned text placed within a bouding box into the native GdPicture image.

Syntax

object.DrawTextBox (sText, nLeft, nTop, nWidth, nHeight, nFontSize, nAlignment, nFontStyle, nTextARGBColor, sFontName, bDrawTextBox, bAntiAlias)

The DrawTextBox syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
sText Required. String. Text to draw.
nLeft Required. Long. Specifies the x-coordinate of the upper-left corner of the text box.
nTop Required. Long. Specifies the y-coordinate of the upper-left corner of the text box.
nWidth Required. Long. Specifies the width in pixel of the text box.
nHeight Required. Long. Specifies the height in pixel of the text box.
nFontSize Required. Long. The font size in units specified by the FontSetUnit() function.
nAlignment Optional. Long. Default value is 1. The text alignment. Can be:
0: left.
1: center.
2: right.
nFontStyle Optional. FontStyle long value. Default value is 0 (Style Regular). Specifies the style of the typeface. This value must be an element of the FontStyle enumeration or the result of a bitwise OR applied to two or more of these elements.
For example, FontStyleBold OR FontStyleUnderline OR FontStyleStrikeout sets the style as a combination of the three styles.
FontStyle enumeration:
FontStyleStyleRegular = 0.
FontStyleStyleBold = 1.
FontStyleStyleItalic = 2.
FontStyleStyleBoldItalic = 3.
FontStyleStyleUnderline = 4.
FontStyleStyleStrikeout = 8.
nTextARGBColor Optional. Long. Default value is Black. ARGB color value of the text.
sFontName Optional. String. Default value is "Arial". The name of the font.
bDrawTextBox Optional. Boolean. Default value is False. Set this parameter to True to draw the textbox that bounds the text.
bAntiAlias Optional. Boolean. Default value is False. Set to True to apply the Antialiasing algorithm else False.

Returns

Long. GdPictureStatus

Remarks

To draw watermark text use an ARGB value with alpha component < 255.

Category

Draw (Text)





© Copyright 2008 GdPicture All rights reserved.
Documentation MAP.