DrawText Method

NI Vision for Visual Basic

DrawText Method

Syntax

CWIMAQVision.DrawText SourceImage, DestImage, x, y, FillMode, Font, Size, Style, Alignment, Text, Width

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Obsolete—Use DrawText2 instead. Draws text on an image.

Remarks

Use this method with U8 and RGB32 images.

Parameters

SourceImage As CWIMAQImage

The input image.

DestImage As CWIMAQImage

The resulting image.

x As Long

The x-coordinate of the point where the method inserts the text.

y As Long

The y-coordinate of the point where the method inserts the text.

FillMode As CWIMAQTextFillModes

The mode the method uses to write the text.

Font As String

The name of the font to use. This parameter is limited to 32 characters.

Size As Long

The size of the font.

Style As CWIMAQTextStyles

The style of the font.

Alignment As CWIMAQTextAlignments

The alignment of the font.

Text As String

The text that the method draws.

Width As Long

On return, the string length of the text.

See Also

DrawText2