| Customize Help
| Save Settings

MgraControlList



Function Map
Synopsis
Control the graphics contained within the 2D graphics list.
Syntax
void MgraControlList(
MIL_ID GraListId, //in
MIL_INT LabelOrIndex, //in
MIL_INT SubIndex, //in
MIL_INT64 ControlType, //in
MIL_DOUBLE ControlValue //in
)
Description

This function allows you to control the settings of graphics contained within the 2D graphics list. Most of the control type settings can be inquired using MgraInquireList().

When graphics are added to the list, they inherit the current settings of the 2D graphics context. However, subsequent changes to the 2D graphics context (for example, with MgraControl()) do not affect graphics already in the list. The settings of graphics in the list can only be modified using MgraControlList().

Using this function, you can also control a sub-element of a graphic in a 2D graphics list. This is useful when a single point of a graphic requires repositioning. For example, you can reposition (M_POSITION_X and M_POSITION_Y) a vertex point of a polygon (MgraLines() with M_POLYGON) by specifying the polygon graphic (LabelOrIndex), and one of its points (SubIndex).

All geometric type changes that you make to the graphics (such as, rotation, scaling, and translation) are applied according to the current input units of each graphic in the list, as specified with M_INPUT_UNITS, on a per graphic basis. For example, if you change the position of two graphics in the list, a dot set in pixel units and a rectangle set in world units, the dot's position will change in pixel units and the rectangle's position will change in world units. However, changing M_INPUT_UNITS to a different value will not convert a graphic's position.

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 when using a C compiler (not a C++ or other compiler) in 64-bit mode, MgraControlList() internally calls the MIL_DOUBLE version of this function (MgraControlListDouble()). If you need to pass integer values, call the MIL_INT64 version of this function (MgraControlListInt64()).
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 to control. The 2D graphics list must have been previously allocated on the required system using MgraAllocList().

LabelOrIndex

Specifies the graphic (one or all) to control. This parameter must be set to one of the following values:

function map For specifying the 2D graphics list or graphic therein
Click to summarizeValue Description
Click to summarize

Specifies the index of an existing graphic on which to apply the control setting.

(summarize)
Parameters

Specifies the index. The index is from 0 (inclusive) to the total number of graphics in the list minus 1. You can get the number graphics in the list using MgraInquireList() with M_NUMBER_OF_GRAPHICS.

If the control setting is not supported on the graphic specified, an error is generated. For example, a dot (MgraDot()) cannot be scaled (M_APPLY_SCALE) or rotated (M_ROTATE).

Click to summarize

Specifies the label of an existing graphic on which to apply the control setting.

(summarize)
Parameters

Specifies the label. The label must be greater than 0. You can retrieve the label of the last graphic added to the list using MgraInquireList() with M_LAST_LABEL.

If the control setting is not supported on the graphic specified, an error is generated. For example, a dot (MgraDot()) cannot be scaled (M_APPLY_SCALE) or rotated (M_ROTATE).

Click to summarize M_ALL

Applies the specified control setting to all the graphics contained within the 2D graphics list. The graphics that do not support the specified control type setting remain unchanged.

(summarize)
Click to summarize M_ALL_SELECTED

Applies the specified control setting to all the graphics contained within the 2D graphics list that are currently selected (that is, all graphics with M_GRAPHIC_SELECTED set to M_TRUE). The graphics that are not selected remain unchanged.

(summarize)
Click to summarize M_LIST

Applies the specified control setting to the 2D graphics list itself.

SubIndex

Specifies the index of the sub-element of the graphic on which to apply the control setting. If this information is not required or supported, set this parameter to M_DEFAULT.

function map For specifying the index of a graphic's sub-element
Click to summarizeValue Description
Click to summarize M_DEFAULT

Specifies to apply the control setting to the graphic itself (instead of just a sub-element).

Click to summarize 0 <= Value <= M_NUMBER_OF_SUB_ELEMENTS

Specifies the index of the sub-element of the graphic on which to apply the control setting. The following table lists all the graphics for which you can control their individual sub-elements and outlines how sub-indices are assigned for each of these.

Graphics types

Index of sub-element values

Dots (created using MgraDots()).

The indices, starting from 0, are assigned to each dot in order of creation.

A single line (created using MgraLine() or user-defined using MgraInteractive() set to M_GRAPHIC_TYPE_LINE).

0 is assigned to the specified start point, and 1 is assigned to the specified end point of the line.

Sets of finite length lines (created using MgraLines() with M_LINE_LIST).

The indices, starting from 0, are assigned to the specified start point and end point of each line, in order of creation. For example, the start point of the first line has an index of 0 and the end point has an index of 1, and the start point of the second line has an index of 2 and the end point has an index of 3.

Sets of infinite lines (created using MgraLines() with M_INFINITE_LINES).

The indices, starting from 0, are assigned to the first and second specified point of each line, in order of creation. For example, the first specified point of the first line has an index of 0 and its second specified point has an index of 1, and the first specified point of the second line has an index of 2 and its second specified point has an index of 3.

A polygon (created using MgraLines() with M_POLYGON or user-defined using MgraInteractive() set to M_GRAPHIC_TYPE_POLYGON).

The indices, starting from 0, are assigned to each polygon vertex in order of creation.

A polyline (created using MgraLines() with M_POLYLINE or user-defined using MgraInteractive() set to M_GRAPHIC_TYPE_POLYLINE).

The indices, starting from 0, are assigned to each polyline point in order of creation.

(summarize)
ControlType

Specifies the 2D graphics list setting to control.

See the Parameter associations section for possible values that can be specified.

ControlValue

Specifies the value to assign to the 2D graphics list setting.

See the Parameter associations section for possible values that can be specified.

The following ControlType and corresponding ControlValue parameter settings are used to change general settings of a 2D graphics list itself. In this case, set the LabelOrIndex parameter to M_LIST and the SubIndex parameter to M_DEFAULT.

function map For changing general settings of the 2D graphics list itself
Click to summarize
ControlType
Description
ControlValue
Click to summarize M_ANGLE_SNAPPING_VALUE

Sets the angular value to use as a multiple when rotating the graphic. This value only applies when using M_ANGLE_SNAPPING. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 15.0°.

Click to summarize 1.0 <= Value <= 180.0

Specifies the value to use as a multiple, in degrees. The value must be a divisor of 180.0.

(summarize)
Click to summarize M_EASY_SELECTION

Sets whether MIL allows the easy selection of graphics on the display. When easy selection is enabled, you can select closed graphics (such as circles) by clicking anywhere inside them, even if they are not filled. To select non-filled graphics when easy selection is disabled, you must click on their contour. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_DISABLE

Specifies that MIL does not allow for the easy selection of graphics on the display.

Click to summarize M_ENABLE

Specifies that MIL allows for the easy selection of graphics on the display.

Click to summarize M_INTERACTIVE_ANNOTATIONS_COLOR +

Sets the color of the selection box and handles in interactive mode. INQ

(summarize)
Click to summarize
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

Specifies an RGB value when drawing in an 8-bit, 3-band buffer. The red, green, and blue values must be between 0 and 255, inclusive.

When drawing in a 16-bit or 32-bit multi-band buffer, the components of the RGB value are cast to the type of the destination buffer's bands.

To specify a 16-bit or 32-bit color component, use MgraControlList() with M_INTERACTIVE_ANNOTATIONS_COLOR combined with the appropriate constant (M_RED, M_GREEN, or M_BLUE).

(summarize)
Parameters

Specifies the red component, as a value between 0 and 255.

Specifies the green component, as a value between 0 and 255.

Specifies the blue component, as a value between 0 and 255.

Click to summarize M_COLOR_BLACK

Specifies the color black.

Click to summarize M_COLOR_BLUE

Specifies the color blue.

Click to summarize M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Click to summarize M_COLOR_CYAN

Specifies the color cyan.

Click to summarize M_COLOR_DARK_BLUE

Specifies the color dark blue.

Click to summarize M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Click to summarize M_COLOR_DARK_GREEN

Specifies the color dark green.

Click to summarize M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Click to summarize M_COLOR_DARK_RED

Specifies the color dark red.

Click to summarize M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Click to summarize M_COLOR_GRAY

Specifies the color gray.

Click to summarize M_COLOR_GREEN

Specifies the color green.

Click to summarize M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Click to summarize M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Click to summarize M_COLOR_LIGHT_GREEN

Specifies the color light green.

Click to summarize M_COLOR_LIGHT_WHITE

Specifies the color light white.

Click to summarize M_COLOR_MAGENTA

Specifies the color magenta.

Click to summarize M_COLOR_RED

Specifies the color red.

Click to summarize M_COLOR_WHITE

Specifies the color white.

Click to summarize M_COLOR_YELLOW

Specifies the color yellow.

Click to summarize Value

Specifies a grayscale value. The buffer can be a 1-band or multi-band buffer. The specified value is cast to the buffer type and depth.

Note that a grayscale value can be any integer or floating-point number. If the given value exceeds the range of the possible values that can be stored in each band of the destination buffer, the least significant bits of the value are used.

(summarize)
Click to summarize M_MODE_RESIZE

Sets the interactive behavior when resizing the graphic using its selection box. To resize the graphic, click and move one of its selection box's eight resize handles. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_FIXED_CORNER.

Click to summarize M_FIXED_CENTER +

Specifies that all sides of the selection box move symmetrically, and the center does not move, when resizing the graphic.

Click to summarize M_FIXED_CORNER +

Specifies that the center moves, and the opposite corner does not move, when resizing the graphic. If you click on a selection box handle that is not a corner, the opposite side (which includes its corners) does not move when resizing.

(summarize)
Click to summarize M_MODE_RESIZE_ALT

Sets the interactive behavior when resizing the graphic using its selection box and pressing the Alt key. To resize the graphic, click and move (while pressing Alt) one of its selection box's eight resize handles.

If multiple key values (M_MODE_RESIZE_ALT, M_MODE_RESIZE_CTRL, or M_MODE_RESIZE_SHIFT) are set to one of M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO, and multiple keys (Alt, Ctrl, or Shift) are pressed when resizing, M_FIXED_ASPECT_RATIO takes precedence over M_SQUARE_ASPECT_RATIO, and M_SQUARE_ASPECT_RATIO takes precedence over M_NO_CONSTRAINT.

If multiple key values (M_MODE_RESIZE_ALT, M_MODE_RESIZE_CTRL, or M_MODE_RESIZE_SHIFT) are set to one of M_FIXED_CENTER or M_FIXED_CORNER, and multiple keys (Alt, Ctrl, or Shift) are pressed when resizing, M_FIXED_CENTER takes precedence over M_FIXED_CORNER.

If the graphic's aspect ratio is set to 1 using MgraControlList() with M_CONSTRAIN_ASPECT_RATIO, it will remain 1 (M_MODE_RESIZE_ALT will not change it). INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_SQUARE_ASPECT_RATIO.

Click to summarize M_DISABLE

Specifies that pressing the Alt key does not affect how to resize the graphic. In this case, MIL uses M_MODE_RESIZE.

(summarize)
Click to summarize M_FIXED_ASPECT_RATIO

Specifies that the aspect ratio of the graphic remains constant, when resizing the graphic while pressing the Alt key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_FIXED_CENTER

Specifies that all sides of the selection box move symmetrically, and the center does not move, when resizing the graphic while pressing the Alt key. This overrides the value set with M_MODE_RESIZE. The aspect ratio combination value that M_MODE_RESIZE uses (M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO) is not overridden.

(summarize)
Click to summarize M_FIXED_CORNER

Specifies that the center moves, and the opposite corner does not move, when resizing the graphic while pressing the Alt key. If you click on a selection box handle that is not a corner, the opposite side (which includes its corners) does not move when resizing. This overrides the value set with M_MODE_RESIZE. The aspect ratio combination value that M_MODE_RESIZE uses (M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO) is not overridden.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies that the aspect ratio of the graphic can change, when resizing it while pressing the Alt key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_SQUARE_ASPECT_RATIO

Specifies that the aspect ratio of the graphic will be 1:1 (square), when resizing it while pressing the Alt key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_MODE_RESIZE_CTRL

Sets the interactive behavior when resizing the graphic using its selection box and pressing the Ctrl key. To resize the graphic, click and move (while pressing Ctrl) one of its selection box's eight resize handles.

If multiple key values (M_MODE_RESIZE_ALT, M_MODE_RESIZE_CTRL, or M_MODE_RESIZE_SHIFT) are set to one of M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO, and multiple keys (Alt, Ctrl, or Shift) are pressed when resizing, M_FIXED_ASPECT_RATIO takes precedence over M_SQUARE_ASPECT_RATIO, and M_SQUARE_ASPECT_RATIO takes precedence over M_NO_CONSTRAINT.

If multiple key values (M_MODE_RESIZE_ALT, M_MODE_RESIZE_CTRL, or M_MODE_RESIZE_SHIFT) are set to one of M_FIXED_CENTER or M_FIXED_CORNER, and multiple keys (Alt, Ctrl, or Shift) are pressed when resizing, M_FIXED_CENTER takes precedence over M_FIXED_CORNER.

If the graphic's aspect ratio is set to 1 using MgraControlList() with M_CONSTRAIN_ASPECT_RATIO, it will remain 1 (M_MODE_RESIZE_CTRL will not change it). INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_FIXED_CENTER.

Click to summarize M_DISABLE

Specifies that pressing the Ctrl key does not affect how to resize the graphic. In this case, MIL uses M_MODE_RESIZE.

(summarize)
Click to summarize M_FIXED_ASPECT_RATIO

Specifies that the aspect ratio of the graphic remains constant, when resizing the graphic while pressing the Ctrl key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_FIXED_CENTER

Specifies that all sides of the selection box move symmetrically, and the center does not move, when resizing the graphic while pressing the Ctrl key. This overrides the value set with M_MODE_RESIZE. The aspect ratio combination value that M_MODE_RESIZE uses (M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO) is not overridden.

(summarize)
Click to summarize M_FIXED_CORNER

Specifies that the center moves, and the opposite corner does not move, when resizing the graphic while pressing the Ctrl key. If you click on a selection box handle that is not a corner, the opposite side (which includes its corners) does not move when resizing. This overrides the value set with M_MODE_RESIZE. The aspect ratio combination value that M_MODE_RESIZE uses (M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO) is not overridden.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies that the aspect ratio of the graphic can change, when resizing it while pressing the Ctrl key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_SQUARE_ASPECT_RATIO

Specifies that the aspect ratio of the graphic will be 1:1 (square), when resizing it while pressing the Ctrl key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_MODE_RESIZE_SECONDARY_DIMENSION

Sets how to establish the graphic's secondary dimension when defining the graphic interactively on the display. This only applies when creating the graphic using MgraInteractive() with M_GRAPHIC_TYPE_RECT set to M_ORIENTED_RECT. In this case, the graphic's secondary dimension refers to the rectangle's height. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_ONE_SIDED.

Click to summarize M_ONE_SIDED

Specifies to establish the graphic's secondary dimension on one side of a previously established part. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on one side of the width line. The side depends on whether you move your mouse above or below the width line.

(summarize)
Click to summarize M_SYMMETRIC

Specifies to establish the graphic's secondary dimension symmetrically on both sides of a previously established part. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on both sides of the width line. Moving your mouse above or below the width line adjusts the height equally on each side.

(summarize)
Click to summarize M_MODE_RESIZE_SECONDARY_DIMENSION_ALT

Sets how to establish the graphic's secondary dimension when defining the graphic interactively on the display and pressing the Alt key. This only applies when creating the graphic using MgraInteractive() with M_GRAPHIC_TYPE_RECT set to M_ORIENTED_RECT. In this case, the graphic's secondary dimension refers to the rectangle's height.

Unless you disable M_MODE_RESIZE_SECONDARY_DIMENSION_ALT, its value overrides the value set with M_MODE_RESIZE_SECONDARY_DIMENSION. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_DISABLE

Specifies that pressing the Alt key does not affect how to establish the graphic's secondary dimension when defining it interactively on the display. In this case, MIL uses M_MODE_RESIZE_SECONDARY_DIMENSION.

(summarize)
Click to summarize M_ONE_SIDED

Specifies to establish the graphic's secondary dimension on one side of a previously established part, while pressing the Alt key. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on one side of the width line. The side depends on whether you move your mouse (while pressing Alt) above or below the width line.

(summarize)
Click to summarize M_SYMMETRIC

Specifies to establish the graphic's secondary dimension symmetrically on both sides of a previously established part, while pressing the Alt key. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on both sides of the width line. Moving your mouse (while pressing Alt) above or below the width line adjusts the height equally on each side.

(summarize)
Click to summarize M_MODE_RESIZE_SECONDARY_DIMENSION_CTRL

Sets how to establish the graphic's secondary dimension when defining the graphic interactively on the display and pressing the Ctrl key. This only applies when creating the graphic using MgraInteractive() with M_GRAPHIC_TYPE_RECT set to M_ORIENTED_RECT. In this case, the graphic's secondary dimension refers to the rectangle's height.

Unless you disable M_MODE_RESIZE_SECONDARY_DIMENSION_CTRL, its value overrides the value set with M_MODE_RESIZE_SECONDARY_DIMENSION. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_SYMMETRIC.

Click to summarize M_DISABLE

Specifies that pressing the Ctrl key does not affect how to establish the graphic's secondary dimension when defining it interactively on the display. In this case, MIL uses M_MODE_RESIZE_SECONDARY_DIMENSION.

(summarize)
Click to summarize M_ONE_SIDED

Specifies to establish the graphic's secondary dimension on one side of a previously established part, while pressing the Ctrl key. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on one side of the width line. The side depends on whether you move your mouse (while pressing Ctrl) above or below the width line.

(summarize)
Click to summarize M_SYMMETRIC

Specifies to establish the graphic's secondary dimension symmetrically on both sides of a previously established part, while pressing the Ctrl key. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on both sides of the width line. Moving your mouse (while pressing Ctrl) above or below the width line adjusts the height equally on each side.

(summarize)
Click to summarize M_MODE_RESIZE_SECONDARY_DIMENSION_SHIFT

Sets how to establish the graphic's secondary dimension when defining the graphic interactively on the display and pressing the Shift key. This only applies when creating the graphic using MgraInteractive() with M_GRAPHIC_TYPE_RECT set to M_ORIENTED_RECT. In this case, the graphic's secondary dimension refers to the rectangle's height.

Unless you disable M_MODE_RESIZE_SECONDARY_DIMENSION_SHIFT, its value overrides the value set with M_MODE_RESIZE_SECONDARY_DIMENSION. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_DISABLE

Specifies that pressing the Shift key does not affect how to establish the graphic's secondary dimension when defining it interactively on the display. In this case, MIL uses M_MODE_RESIZE_SECONDARY_DIMENSION.

(summarize)
Click to summarize M_ONE_SIDED

Specifies to establish the graphic's secondary dimension on one side of a previously established part, while pressing the Shift key. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on one side of the width line. The side depends on whether you move your mouse (while pressing Shift) above or below the width line.

(summarize)
Click to summarize M_SYMMETRIC

Specifies to establish the graphic's secondary dimension symmetrically on both sides of a previously established part, while pressing the Shift key. For example, when interactively defining an oriented rectangle graphic, the first two clicks on the display define a line that represents the rectangle's width, and the third click defines its height on both sides of the width line. Moving your mouse (while pressing Shift) above or below the width line adjusts the height equally on each side.

(summarize)
Click to summarize M_MODE_RESIZE_SHIFT

Sets the interactive behavior when resizing the graphic using its selection box and pressing the Shift key. To resize the graphic, click and move (while pressing Shift) one of the selection box's eight resize handles.

If multiple key values (M_MODE_RESIZE_ALT, M_MODE_RESIZE_CTRL, or M_MODE_RESIZE_SHIFT) are set to one of M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO, and multiple keys (Alt, Ctrl, or Shift) are pressed when resizing, M_FIXED_ASPECT_RATIO takes precedence over M_SQUARE_ASPECT_RATIO, and M_SQUARE_ASPECT_RATIO takes precedence over M_NO_CONSTRAINT.

If multiple key values (M_MODE_RESIZE_ALT, M_MODE_RESIZE_CTRL, or M_MODE_RESIZE_SHIFT) are set to one of M_FIXED_CENTER or M_FIXED_CORNER, and multiple keys (Alt, Ctrl, or Shift) are pressed when resizing, M_FIXED_CENTER takes precedence over M_FIXED_CORNER.

If the graphic's aspect ratio is set to 1 using MgraControlList() with M_CONSTRAIN_ASPECT_RATIO, it will remain 1 (M_MODE_RESIZE_SHIFT will not change it). INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_FIXED_ASPECT_RATIO.

Click to summarize M_DISABLE

Specifies that pressing the Shift key does not affect how to resize the graphic. In this case, MIL uses M_MODE_RESIZE.

(summarize)
Click to summarize M_FIXED_ASPECT_RATIO

Specifies that the aspect ratio of the graphic remains constant, when resizing the graphic while pressing the Shift key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_FIXED_CENTER

Specifies that all sides of the selection box move symmetrically, and the center does not move, when resizing the graphic while pressing the Shift key. This overrides the value set with M_MODE_RESIZE. The aspect ratio combination value that M_MODE_RESIZE uses (M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO) is not overridden.

(summarize)
Click to summarize M_FIXED_CORNER

Specifies that the center moves, and the opposite corner does not move, when resizing the graphic while pressing the Shift key. If you click on a selection box handle that is not a corner, the opposite side (which includes its corners) does not move when resizing. This overrides the value set with M_MODE_RESIZE. The aspect ratio combination value that M_MODE_RESIZE uses (M_FIXED_ASPECT_RATIO, M_NO_CONSTRAINT, or M_SQUARE_ASPECT_RATIO) is not overridden.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies that the aspect ratio of the graphic can change, when resizing it while pressing the Shift key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_SQUARE_ASPECT_RATIO

Specifies that the aspect ratio of the graphic will be 1:1 (square), when resizing it while pressing the Shift key. This overrides the aspect ratio combination value set for M_MODE_RESIZE. The value that M_MODE_RESIZE uses (M_FIXED_CENTER or M_FIXED_CORNER) is not overridden.

(summarize)
Click to summarize M_MODE_ROTATE

Sets the interactive behavior when rotating the graphic using its selection box. To rotate the graphic, click and move its selection box's rotate handle. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_NO_CONSTRAINT.

Click to summarize M_ANGLE_SNAPPING

Specifies to rotate the graphic by snapping it to an angle that is a multiple of the value set by M_ANGLE_SNAPPING_VALUE.

Click to summarize M_NO_CONSTRAINT

Specifies to rotate the graphic freely.

Click to summarize M_MODE_ROTATE_ALT

Sets the interactive behavior when rotating the graphic using its selection box and pressing the Alt key. To rotate the graphic, click and move (while pressing Alt) its selection box's rotate handle. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_ANGLE_SNAPPING.

Click to summarize M_ANGLE_SNAPPING

Specifies to rotate the graphic by snapping it to an angle that is a multiple of the value set by M_ANGLE_SNAPPING_VALUE, when rotating it while pressing the Alt key. This overrides the value set with M_MODE_ROTATE.

(summarize)
Click to summarize M_DISABLE

Specifies that pressing the Alt key does not affect how to rotate the graphic. In this case, MIL uses M_MODE_ROTATE.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies to rotate the graphic freely, when rotating it while pressing the Alt key. This overrides the value set with M_MODE_ROTATE.

(summarize)
Click to summarize M_MODE_ROTATE_CTRL

Sets the interactive behavior when rotating the graphic using its selection box and pressing the Ctrl key. To rotate the graphic, click and move (while pressing Ctrl) its selection box's rotate handle. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_ANGLE_SNAPPING

Specifies to rotate the graphic by snapping it to an angle that is a multiple of the value set by M_ANGLE_SNAPPING_VALUE, when rotating it while pressing the Ctrl key. This overrides the value set with M_MODE_ROTATE.

(summarize)
Click to summarize M_DISABLE

Specifies that pressing the Ctrl key does not affect how to rotate the graphic. In this case, MIL uses M_MODE_ROTATE.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies to rotate the graphic freely, when rotating it while pressing the Ctrl key. This overrides the value set with M_MODE_ROTATE.

(summarize)
Click to summarize M_MODE_ROTATE_SHIFT

Sets the interactive behavior when rotating the graphic using its selection box and pressing the Shift key. To rotate the graphic, click and move (while pressing Shift) its selection box's rotate handle. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_ANGLE_SNAPPING

Specifies to rotate the graphic by snapping it to an angle that is a multiple of the value set by M_ANGLE_SNAPPING_VALUE, when rotating it while pressing the Shift key. This overrides the value set with M_MODE_ROTATE.

(summarize)
Click to summarize M_DISABLE

Specifies that pressing the Shift key does not affect how to rotate the graphic. In this case, MIL uses M_MODE_ROTATE.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies to rotate the graphic freely, when rotating it while pressing the Shift key. This overrides the value set with M_MODE_ROTATE.

(summarize)
Click to summarize M_MODE_TRANSLATE

Sets the interactive behavior when moving (translating) the graphic using its selection box. To move the graphic, hover over its selection box border until the mouse arrow pointer changes to the move pointer, and then click and drag the graphic to a different location on the display. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_NO_CONSTRAINT.

Click to summarize M_AXIS_ALIGNED

Specifies to move the graphic along the X- and Y-axes.

Click to summarize M_NO_CONSTRAINT

Specifies to move the graphic freely.

Click to summarize M_MODE_TRANSLATE_ALT

Sets the interactive behavior when moving (translating) the graphic using its selection box and pressing the Alt key. To move the graphic, hover over its selection box border until the mouse arrow pointer changes to the move pointer, and then click and drag the graphic (while pressing Alt) to a different location on the display. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_AXIS_ALIGNED

Specifies to move the graphic along the X- and Y-axes, when moving it while pressing the Alt key. This overrides the value set with M_MODE_TRANSLATE.

(summarize)
Click to summarize M_DISABLE

Specifies that pressing the Alt key does not affect how to move the graphic. In this case, MIL uses M_MODE_TRANSLATE.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies to move the graphic freely, when moving it while pressing the Alt key. This overrides the value set with M_MODE_TRANSLATE.

(summarize)
Click to summarize M_MODE_TRANSLATE_CTRL

Sets the interactive behavior when moving (translating) the graphic using its selection box and pressing the Ctrl key. To move the graphic, hover over its selection box border until the mouse arrow pointer changes to the move pointer, and then click and drag the graphic (while pressing Ctrl) to a different location on the display. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_DISABLE.

Click to summarize M_AXIS_ALIGNED

Specifies to move the graphic along the X- and Y-axes, when moving it while pressing the Ctrl key. This overrides the value set with M_MODE_TRANSLATE.

(summarize)
Click to summarize M_DISABLE

Specifies that pressing the Ctrl key does not affect how to move the graphic. In this case, MIL uses M_MODE_TRANSLATE.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies to move the graphic freely, when moving it while pressing the Ctrl key. This overrides the value set with M_MODE_TRANSLATE.

(summarize)
Click to summarize M_MODE_TRANSLATE_SHIFT

Sets the interactive behavior when moving (translating) the graphic using its selection box and pressing the Shift key. To move the graphic, hover over its selection box border until the mouse arrow pointer changes to the move pointer, and then click and drag the graphic (while pressing Shift) to a different location on the display. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_AXIS_ALIGNED.

Click to summarize M_AXIS_ALIGNED

Specifies to move the graphic along the X- and Y-axes, when moving it while pressing the Shift key. This overrides the value set with M_MODE_TRANSLATE.

(summarize)
Click to summarize M_DISABLE

Specifies that pressing the Shift key does not affect how to move the graphic. In this case, MIL uses M_MODE_TRANSLATE.

(summarize)
Click to summarize M_NO_CONSTRAINT

Specifies to move the graphic freely, when moving it while pressing the Shift key. This overrides the value set with M_MODE_TRANSLATE.

(summarize)
Click to summarize M_MULTIPLE_SELECTION

Sets whether to permit interactive multiple selection using the Ctrl key. When this setting is enabled, a user can select multiple graphics by holding down the Ctrl key and clicking on the graphics that need to be selected. Note that, even if this is disabled, multiple selection is still possible programmatically using M_GRAPHIC_SELECTED. INQ

(summarize)
Click to summarize M_DISABLE

Specifies that interactive multiple selection is not permitted.

Click to summarize M_ENABLE

Specifies that interactive multiple selection is permitted.

This is the default value.

(summarize)
Click to summarize M_MULTIPLE_SELECTION_KEY

Sets the keyboard key that you can press to select multiple graphics with your mouse on the display. Clicking on a graphic that you have already selected, while pressing the specified key, deselects that graphic. INQ

(summarize)
Click to summarize M_DEFAULT

Same as M_KEY_CTRL.

Click to summarize M_KEY_ALT

Specifies that you can press the Alt key to select (or deselect) multiple graphics.

Click to summarize M_KEY_CTRL

Specifies that you can press the Ctrl key to select (or deselect) multiple graphics.

Click to summarize M_KEY_SHIFT

Specifies that you can press the Shift key to select (or deselect) multiple graphics.

Click to summarize M_SELECTED_COLOR +

Sets the color of the selected graphics in interactive mode. INQ

(summarize)
Click to summarize
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

Specifies an RGB value when drawing in an 8-bit, 3-band buffer. The red, green, and blue values must be between 0 and 255, inclusive.

When drawing in a 16-bit or 32-bit multi-band buffer, the components of the RGB value are cast to the type of the destination buffer's bands.

To specify a 16-bit or 32-bit color component, use MgraControlList() with M_SELECTED_COLOR combined with the appropriate constant (M_RED, M_GREEN, or M_BLUE).

(summarize)
Parameters

Specifies the red component, as a value between 0 and 255.

Specifies the green component, as a value between 0 and 255.

Specifies the blue component, as a value between 0 and 255.

Click to summarize M_COLOR_BLACK

Specifies the color black.

Click to summarize M_COLOR_BLUE

Specifies the color blue.

Click to summarize M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Click to summarize M_COLOR_CYAN

Specifies the color cyan.

Click to summarize M_COLOR_DARK_BLUE

Specifies the color dark blue.

Click to summarize M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Click to summarize M_COLOR_DARK_GREEN

Specifies the color dark green.

Click to summarize M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Click to summarize M_COLOR_DARK_RED

Specifies the color dark red.

Click to summarize M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Click to summarize M_COLOR_GRAY

Specifies the color gray.

Click to summarize M_COLOR_GREEN

Specifies the color green.

Click to summarize M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Click to summarize M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Click to summarize M_COLOR_LIGHT_GREEN

Specifies the color light green.

Click to summarize M_COLOR_LIGHT_WHITE

Specifies the color light white.

Click to summarize M_COLOR_MAGENTA

Specifies the color magenta.

Click to summarize M_COLOR_RED

Specifies the color red.

Click to summarize M_COLOR_WHITE

Specifies the color white.

Click to summarize M_COLOR_YELLOW

Specifies the color yellow.

Click to summarize Value

Specifies a grayscale value. The buffer can be a 1-band or multi-band buffer. The specified value is cast to the buffer type and depth.

Note that a grayscale value can be any integer or floating-point number. If the given value exceeds the range of the possible values that can be stored in each band of the destination buffer, the least significant bits of the value are used.

(summarize)
Click to summarize M_SELECTION_RADIUS

Sets the size of the selection-radius in interactive mode. Selection-radius refers to how close a mouse click needs to be to a graphic to select it. For example if a graphic is at a position that is 4 units radially away from where you clicked, the graphic will appear selected if the selection-radius is set to a value greater than or equal to 4 units. INQ

(summarize)
Click to summarize Value >= 1.0

Specifies the size of the selection-radius, in display units (these are pixel units that remain unaltered when you pan or zoom the display).

The default value is 8.0.

(summarize)
Combination values for M_FIXED_CENTER (when ControlType=M_MODE_RESIZE and ControlValue=M_FIXED_CENTER); M_FIXED_CORNER (when ControlType=M_MODE_RESIZE and ControlValue=M_FIXED_CORNER).

You can add one of the following values to the above-mentioned values to specify the aspect ratio when resizing the graphic.

The following values will not modify the graphic's aspect ratio if it is set to 1 using MgraControlList() with M_CONSTRAIN_ASPECT_RATIO.

function map For specifying the aspect ratio when resizing the graphic
Click to summarize
Combination value
Description
Click to summarize M_FIXED_ASPECT_RATIO

Specifies that the aspect ratio of the graphic remains constant when resizing it.

Click to summarize M_NO_CONSTRAINT

Specifies that the aspect ratio of the graphic can change when resizing it.

This is the default value.

(summarize)
Click to summarize M_SQUARE_ASPECT_RATIO

Specifies that the aspect ratio of the graphic will be 1:1 (square) when resizing it.

The following ControlType and corresponding ControlValue parameter settings are used to change the general settings inherited from the 2D graphics context when a graphic is initially added to the list. Unless otherwise specified, these affect all types of graphics.

In this case, the LabelOrIndex parameter can be set to one or all graphics and the SubIndex parameter must be set to M_DEFAULT.

function map For changing the general settings inherited from the 2D graphics context
Click to summarize
ControlType
Description
ControlValue
Click to summarize M_COLOR +

Sets the foreground color of the graphic. INQ

(summarize)
Click to summarize
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

Specifies an RGB value when drawing in an 8-bit, 3-band buffer. The red, green, and blue values must be between 0 and 255, inclusive.

When drawing in a 16-bit or 32-bit multi-band buffer, the components of the RGB value are cast to the type of the destination buffer's bands.

To specify a 16-bit or 32-bit color component, use MgraControlList() with M_COLOR combined with the appropriate constant (M_RED, M_GREEN, or M_BLUE).

(summarize)
Parameters

Specifies the red component, as a value between 0 and 255.

Specifies the green component, as a value between 0 and 255.

Specifies the blue component, as a value between 0 and 255.

Click to summarize M_COLOR_BLACK

Specifies the color black.

Click to summarize M_COLOR_BLUE

Specifies the color blue.

Click to summarize M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Click to summarize M_COLOR_CYAN

Specifies the color cyan.

Click to summarize M_COLOR_DARK_BLUE

Specifies the color dark blue.

Click to summarize M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Click to summarize M_COLOR_DARK_GREEN

Specifies the color dark green.

Click to summarize M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Click to summarize M_COLOR_DARK_RED

Specifies the color dark red.

Click to summarize M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Click to summarize M_COLOR_GRAY

Specifies the color gray.

Click to summarize M_COLOR_GREEN

Specifies the color green.

Click to summarize M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Click to summarize M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Click to summarize M_COLOR_LIGHT_GREEN

Specifies the color light green.

Click to summarize M_COLOR_LIGHT_WHITE

Specifies the color light white.

Click to summarize M_COLOR_MAGENTA

Specifies the color magenta.

Click to summarize M_COLOR_RED

Specifies the color red.

Click to summarize M_COLOR_WHITE

Specifies the color white.

Click to summarize M_COLOR_YELLOW

Specifies the color yellow.

Click to summarize Value

Specifies a grayscale value. The buffer can be a 1-band or multi-band buffer. The specified value is cast to the buffer type and depth.

The default value is -1. For example, this value is equivalent to 0xFF for an 8-bit buffer.

Note that a grayscale value can be any integer or floating-point number. If the given value exceeds the range of the possible values that can be stored in each band of the destination buffer, the least significant bits of the value are used.

(summarize)
Click to summarize M_DRAW_DIRECTION

Sets how to draw (render) an arrow pointing in the direction with which a graphic was defined. This only affects graphics that are not filled, and that have such a direction as part of their definition; for example, arc, ellipse, line, rectangle, and ring. MIL ignores this setting for other graphics. This setting does not affect drawings created using a processing or analysis module draw function (M...Draw()).

For more information about how the directions are drawn for different graphics, see the Drawing graphics in a calibrated image subsection of the Drawing graphics section of Chapter 24: Generating graphics. INQ

(summarize)
Click to summarize M_NONE

Specifies that no direction is drawn.

Click to summarize M_PRIMARY_DIRECTION

Specifies to draw an arrow showing the primary direction of the graphic. For example, if you draw the primary direction for a rectangle defined with MgraRectAngle(), the arrow will point in the angular direction set with the Angle parameter.

(summarize)
Click to summarize M_PRIMARY_DIRECTION + M_SECONDARY_DIRECTION

Specifies to draw an arrow showing both the primary and secondary direction of the graphic.

Click to summarize M_SECONDARY_DIRECTION

Specifies to draw an arrow showing the secondary direction of the graphic. For example, a rectangle's secondary direction is equal to its PrimaryDirection - 90°.

(summarize)
Click to summarize M_DRAW_OFFSET_X

Sets the offset to subtract from the source X-coordinates before rendering the graphic.

This is useful to take results obtained relative to an offset and draw them relative to the top-left corner of the destination image of a draw operation. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 0.0 pixels.

Click to summarize Value

Specifies the X-coordinate offset to subtract, in pixels.

Click to summarize M_DRAW_OFFSET_Y

Sets the offset to subtract from the source Y-coordinates before rendering the graphic.

This is useful to take results obtained relative to an offset and draw them relative to the top-left corner of the destination image of a draw operation. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 0.0 pixels.

Click to summarize Value

Specifies the Y-coordinate offset to subtract, in pixels.

Click to summarize M_DRAW_ZOOM_X

Sets the scaling factor in the X-direction. This value is useful to zoom in on drawings of results. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 1.0.

Click to summarize Value > 0

Specifies the scaling factor in the X-direction.

Click to summarize M_DRAW_ZOOM_Y

Sets the scaling factor in the Y-direction. This value is useful to zoom in on drawings of results. INQ

(summarize)
Click to summarize M_DEFAULT

Specifies the default value; the default value is 1.0.

Click to summarize Value > 0

Specifies the scaling factor in the Y-direction.

Click to summarize M_FIXTURE

Sets the camera calibration information to use when rendering (drawing or displaying) a graphic that has been defined in world units (M_INPUT_UNITS set to M_WORLD).

MIL can interpret positioning and dimensioning information of the graphic solely using the camera calibration information associated with the destination image buffer (or the image buffer selected to the display). Alternatively, you can have MIL use the explicitly specified camera calibration information (M_GRAPHIC_SOURCE_CALIBRATION). If only the destination or the graphic is associated with camera calibration information, it will be used to render the graphic. However, if both are available, you should use M_FIXTURE to identify with respect to which of their relative coordinate systems has positioning and dimensioning information been specified. If with respect to that of the destination camera calibration information (M_USE_DESTINATION_FIRST), the source camera calibration information is not used. If with respect to that of the source camera calibration information (M_USE_SOURCE_FIRST), positions and dimensions are transformed from this relative coordinate system to the absolute coordinate system; then, since it is assumed that there is only one absolute coordinate system, these positions and dimensions are transformed from the absolute coordinate system to the pixel coordinate system, using the destination camera calibration information. INQ

(summarize)
Click to summarize M_USE_DESTINATION_FIRST

Specifies that the camera calibration information of the destination is used when rendering the graphic. In this case, the graphic follows the relative coordinate system of the destination. This is most often used when working with ROIs.

(summarize)
Click to summarize M_USE_SOURCE_FIRST

Specifies that the camera calibration information of the graphic, set with M_GRAPHIC_SOURCE_CALIBRATION, is used when rendering the graphic. In this case, the graphic is positioned independent of the destination's relative coordinate system; the destination camera calibration information is only used, if available, for the world to pixel mapping.

(summarize)
Click to summarize M_GRAPHIC_CONVERSION_MODE

Sets how the shape of a graphic, defined in world units, is converted to pixels (rendered).

Drawings created using a processing or analysis module draw function (M...Draw()) ignore this control type; instead the graphics are drawn using settings defined in their respective modules. INQ

(summarize)
Click to summarize M_PRESERVE_SHAPE_AVERAGE

Specifies to render the graphic so that its shape is preserved even if it means not respecting the camera calibration information exactly. For example, a rectangle in world units will be mapped to a rectangle in pixel units, even if the accurate conversion would not yield a rectangle.

This setting applies only to dots (MgraDot() and MgraDots()) and to rectangles (MgraRect() and MgraRectAngle()).

(summarize)
Click to summarize M_RESHAPE_FOLLOWING_DISTORTION

Specifies that all points along the contour of the graphic will be converted using the camera calibration information, following any non-linear distortion. This mode is slower, but more accurate.

(summarize)
Click to summarize M_RESHAPE_FROM_POINTS

Specifies that only a few key points or features will be converted using the camera calibration information; from these points, the rest of the graphic will be rendered respecting the shape of the graphic. For example, when converting a line segment from world to pixel units, the two end points are mapped to pixel units, and then a straight line is drawn connecting these two points, ignoring any non-linear distortion in-between. This is the fastest mode, and is accurate as long as there is only linear distortion.

(summarize)
Click to summarize M_GRAPHIC_SOURCE_CALIBRATION

Sets the camera calibration information to use to interpret positioning and dimensioning information of a graphic defined in world units (M_INPUT_UNITS set to M_WORLD), if you have set M_FIXTURE to M_USE_SOURCE_FIRST. If the destination also has camera calibration information, positioning and dimensioning information are transformed from the relative coordinate system of the source camera calibration information to its absolute coordinate system. Then, since it is assumed that there is only one absolute coordinate system, the dimensions and positions are transformed from the absolute coordinate system to the pixel coordinate system, using the destination camera calibration information.

Note that this camera calibration information is also used if you have set M_FIXTURE to M_USE_DESTINATION_FIRST, but the graphic is drawn in an image buffer that has no camera calibration information. INQ

(summarize)
Click to summarize