imaqDrawLineOnImage

NI Vision for LabWindows/CVI Function

imaqDrawLineOnImage

Usage

int imaqDrawLineOnImage(Image* dest, const Image* source, DrawMode mode, Point start, Point end, float newPixelValue);

Purpose

Draws a line on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_SGL

Parameters

Name

Type

Description

dest Image* The destination image.
source const Image* The source image.
mode DrawMode The method that the function uses to draw a line. Valid values are IMAQ_DRAW_VALUE or IMAQ_DRAW_INVERT.
start Point The coordinate location of the starting point of the line.
end Point The coordinate location of the ending point of the line.
newPixelValue float If you set mode to IMAQ_DRAW_VALUE, newPixelValue sets the pixel value in which the function draws the line. If you set mode to IMAQ_DRAW_INVERT, the function ignores this parameter.

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().