imaqDrawTextOnImage

NI Vision for LabWindows/CVI Function

imaqDrawTextOnImage

Usage

int imaqDrawTextOnImage(Image* dest, const Image* source, Point coord, const char* text, const DrawTextOptions* options, int* fontNameUsed);

Purpose

Draws text on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_RGB

Parameters

Name

Type

Description

dest Image* The destination image.
source const Image* The source image.
coord Point The coordinates of the text reference point.
text const char* The text that the function draws. This parameter is required and cannot be NULL.
options const DrawTextOptions* The method that the function uses to draw text.
fontNameUsed int* On return, equals TRUE if the user supplied font name in options was used, and FALSE if the default font name was used.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().

Parameter Discussion

options—Set the options parameter to NULL to use the default options, as follows:

fontName Arial
fontSize 12
bold FALSE
italic FALSE
underline FALSE
strikeout FALSE
textAlignment IMAQ_LEFT
fontColor IMAQ_WHITE