imaqOverlayText

NI Vision for LabWindows/CVI Function

imaqOverlayText

Usage

int imaqOverlayText(Image* image, Point origin, const char* text, const RGBValue* color, const OverlayTextOptions* options, const char* group);

Purpose

Overlays a string of text onto an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image Image* The image on which to overlay the text.
origin Point The coordinate location of the text reference point.
text const char* The text that the function overlays. This parameter is required and cannot be NULL.
color const RGBValue* The color of the text. The alpha color channel is not supported. Setting the color to transparent has the same effect as selecting black. This parameter is required and cannot be NULL.
options const OverlayTextOptions* The method that the function uses to overlay text.
group const char* The group to which you want to add the overlay. Set this parameter to NULL to add the overlay to the default group.

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 options to NULL to use the default options, as follows:

fontName Arial
fontSize 12
bold FALSE
italic FALSE
underline FALSE
strikeout FALSE
horizontalTextAlignment IMAQ_LEFT
verticalTextAlignment IMAQ_BOTTOM
backgroundColor IMAQ_RGB_TRANSPARENT
angle 0