| Customize Help
| Save Settings

MgraDraw



Function Map
Synopsis
Draw graphics, contained in a 2D graphics list, in an image.
Syntax
void MgraDraw(
MIL_ID GraListId, //in
MIL_ID DestImageId, //in
MIL_INT64 ControlFlag //in
)
Description

This function draws graphics, contained in the specified 2D graphics list, destructively (raster-based) in the specified image.

A graphic's position and dimension values are interpreted with respect to the input coordinate system, specified using MgraControl() with M_INPUT_UNITS. Note that you can also use MgraControlList() with M_INPUT_UNITS to modify the input units of graphics that have already been added to the 2D graphics list.

If you attempt to draw the graphics contained in the 2D graphics list using world units, but without passing MgraDraw() a calibrated image, the function will generate an error.

If parts of the graphics fall outside of the specified image buffer area, those parts are clipped off.

If you are drawing graphics in a 2D graphics list with interactive mode enabled (MdispControl() with M_GRAPHIC_LIST_INTERACTIVE set to M_ENABLE), selected graphics (graphics with M_GRAPHIC_SELECTED set to M_TRUE) are typically surrounded by annotations that indicate the graphic is selected, such as the selection box (represented by a dotted line) with handles that allow user interaction. By default, this function will draw the annotations that indicate the graphic is selected, unless otherwise specified.

Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same MIL 2D graphics list (GraListId) without using an M_MUTEX object, as long as all the other parameters of the concurrent calls do not also share data.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
GraListId

Specifies the identifier of the 2D graphics list containing the graphics to destructively draw in the image. The 2D graphics list must have been previously allocated on the required system using MgraAllocList().

DestImageId

Specifies the identifier of the destination image buffer in which to draw. If the 2D graphics list contains graphics set in world units, a camera calibration context must be associated with the destination image buffer; otherwise, an error is generated.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

Note that you can also annotate an image non-destructively by drawing into its display's overlay buffer.

ControlFlag

Specifies whether to also draw the annotations that indicate whether a graphic is selected, such as the selection box and handles. This parameter must be set to one of the following values:

function map For specifying whether to draw annotations that indicate a graphic is selected
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies that annotations that indicate whether a graphic is selected will be drawn destructively in the image buffer, along with the graphic.

Click to summarize M_NO_INTERACTIVE_ANNOTATION

Specifies that annotations that indicate whether a graphic is selected will not be drawn in the image buffer, even if there are selected graphics in the 2D graphics list.

Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
NONE DEFAULT NO INTERACTIVE ANNOTATION