| MIL 10 Reference
| Customize Help
| Save Settings

MgraInquire



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Inquire information about a graphics context.
Syntax
MIL_INT MgraInquire(
MIL_ID ContextGraId, //in
MIL_INT64 InquireType, //in
void *UserVarPtr //out
)
Description

This function inquires information about a specified graphics context. To inquire about a graphics list, use MgraInquireList().

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextGraId

Specifies the identifier of the graphics context about which to inquire information. This parameter must be set to one of the following values:

function map For specifying the graphics context
CollapseValue Description
Collapse M_DEFAULT

Specifies that the default graphics context of the current MIL application is used.

Note that there is a different default graphics context for each thread.

(summarize)
Collapse MIL graphics context identifier

Specifies a valid graphics context identifier, which you have allocated using MgraAlloc().

InquireType

Specifies the graphics context setting to inquire.

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

UserVarPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • MIL_DOUBLE
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address in which to write the requested information. Since this function also returns the requested information, you can set this parameter to M_NULL.

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

The tables below list possible values for the InquireType parameter and possible values returned to the UserVarPtr parameter.

To inquire general graphics context settings that apply to all graphics, the InquireType parameter should be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For inquiring about general graphics context settings
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_COLOR +

Inquires the foreground color. SET SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse M_COLOR_BLACK

Specifies the color black.

Collapse M_COLOR_BLUE

Specifies the color blue.

Collapse M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Collapse M_COLOR_CYAN

Specifies the color cyan.

Collapse M_COLOR_DARK_BLUE

Specifies the color dark blue.

Collapse M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Collapse M_COLOR_DARK_GREEN

Specifies the color dark green.

Collapse M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Collapse M_COLOR_DARK_RED

Specifies the color dark red.

Collapse M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Collapse M_COLOR_GRAY

Specifies the color gray.

Collapse M_COLOR_GREEN

Specifies the color green.

Collapse M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Collapse M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Collapse M_COLOR_LIGHT_GREEN

Specifies the color light green.

Collapse M_COLOR_LIGHT_WHITE

Specifies the color light white.

Collapse M_COLOR_MAGENTA

Specifies the color magenta.

Collapse M_COLOR_RED

Specifies the color red.

Collapse M_COLOR_WHITE

Specifies the color white.

Collapse M_COLOR_YELLOW

Specifies the color yellow.

Collapse Byte-encoded RGB value

Specifies an encoded RGB value. To verify if the value is a byte-encoded RGB value, use the M_IS_RGB888 macro. To retrieve the R, G, and B components, use the M_RGB888_R, M_RGB888_G, and M_RGB888_B macros.

(summarize)
Collapse Value

Specifies a grayscale value. INFO

Collapse M_DRAW_OFFSET_X +

Inquires the offset subtracted from the source X-coordinates. SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value

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

Collapse M_DRAW_OFFSET_Y +

Inquires the offset subtracted from the source Y-coordinates. SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value

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

Collapse M_DRAW_ZOOM_X +

Inquires the scale factor in the X-direction. SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value > 0

Specifies the scale factor in the X-direction.

Collapse M_DRAW_ZOOM_Y +

Inquires the scale factor in the Y-direction. SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value > 0

Specifies the scale factor in the Y-direction.

Collapse M_FIXTURE +

Inquires the calibration information used when rendering (drawing or displaying) a graphic defined in world units, when both source calibration information and destination calibration information are available to interpret positioning and dimensioning information.

If with respect to that of the source 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 calibration information. SET

(summarize)
Collapse M_USE_DESTINATION_FIRST

Specifies that the calibration information of the destination is used when rendering the graphic. INFO

Collapse M_USE_SOURCE_FIRST

Specifies that the calibration information of the graphic, set with M_GRAPHIC_SOURCE_CALIBRATION, is used when rendering the graphic. INFO

Collapse M_GRAPHIC_CONVERSION_MODE +

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

(summarize)
Collapse M_PRESERVE_SHAPE_AVERAGE

Specifies to render the graphic so that its shape is preserved, even if it means not respecting the calibration information exactly. INFO

Collapse M_RESHAPE_FOLLOWING_DISTORTION

Specifies that all points along the contour of the graphic will be converted using the calibration information, following any non-linear distortion. INFO

Collapse M_RESHAPE_FROM_POINTS

Specifies that only a few key points or features will be converted using the calibration information; from these converted points, the rest of the graphic will be rendered respecting the shape of the graphic. INFO

Collapse M_GRAPHIC_SOURCE_CALIBRATION +

Inquires the identifier of the calibration information used to interpret positioning and dimensioning information of a graphic defined in world units. SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_ID

Collapse M_NULL

Specifies that no source calibration information is available to interpret positioning and dimensioning information of a graphic defined in world units, except when the graphic is drawn using the draw function (M...Draw()) of a processing or analysis module; in this case, the calibration information of the drawn setting or result will be used.

Collapse MIL Identifier

Specifies the identifier of a calibration context, image buffer or processing or analysis module result buffer, whose calibration information to use; this object is only associated with the graphics context, not copied. INFO

Collapse M_INPUT_UNITS +

Inquires the units with which to interpret the graphic's positional and dimensional information. SET

(summarize)
Collapse M_DISPLAY

Specifies to interpret the values in pixel units that, unlike M_PIXEL, are not altered when the display is panned or zoomed. INFO

Collapse M_PIXEL

Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. INFO

Collapse M_WORLD

Specifies to interpret the values in world units, with respect to the relative coordinate system. INFO

Collapse M_OWNER_SYSTEM +

Inquires the MIL identifier (MIL_ID) of the system on which the graphics context has been allocated. SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_ID

Collapse M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Collapse MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

Collapse M_OWNER_SYSTEM_TYPE +

Inquires the type of system on which the graphics context was allocated. SET

(summarize)
Collapse M_SYSTEM_1394_TYPE

Specifies a MIL IEEE 1394 IIDC system.

Collapse M_SYSTEM_CRONOSPLUS_TYPE

Specifies a MIL CronosPlus system.

Collapse M_SYSTEM_GIGE_VISION_TYPE

Specifies a MIL GigE Vision system.

Collapse M_SYSTEM_GPU_TYPE

Specifies a MIL GPU system.

Collapse M_SYSTEM_HOST_TYPE

Specifies the Host.

Collapse M_SYSTEM_IRIS_GT_TYPE

Specifies a MIL Iris GT system.

Collapse M_SYSTEM_MORPHIS_TYPE

Specifies a MIL Morphis system.

Collapse M_SYSTEM_MORPHISQXT_TYPE

Specifies a MIL Morphis QxT system.

Collapse M_SYSTEM_ORION_HD_TYPE

Specifies a MIL Orion HD system.

Collapse M_SYSTEM_RADIENT_TYPE

Specifies a MIL Radient system.

Collapse M_SYSTEM_RADIENTCLHS_TYPE

Specifies a MIL Radient eV-CLHS system.

Collapse M_SYSTEM_RADIENTCXP_TYPE

Specifies a MIL Radient eV-CXP system.

Collapse M_SYSTEM_RADIENTEVCL_TYPE

Specifies a MIL Radient eV-CL system.

Collapse M_SYSTEM_RADIENTPRO_TYPE

Specifies a MIL Radient Pro system.

Collapse M_SYSTEM_SOLIOS_TYPE

Specifies a MIL Solios system.

Collapse M_SYSTEM_USB3_VISION_TYPE

Specifies a MIL USB3 Vision system.

Collapse M_SYSTEM_VIO_TYPE

Specifies a MIL Vio system.

To inquire graphics context settings that affect the interactivity of a graphic, drawn in a graphics list associated with a display when interactive mode is enabled (MdispControl() with M_GRAPHIC_LIST_INTERACTIVE set to M_ENABLE), the InquireType parameter should be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For inquiring about a setting related to interactivity
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_EDITABLE +

Inquires whether a graphic can be edited via user interaction in an interactive display. If a graphic is not visible or if it is not selectable, it is not editable and this setting is ignored. SET

(summarize)
Collapse M_DISABLE

Specifies that the graphic cannot be edited via user interaction. INFO

Collapse M_ENABLE

Specifies that the graphic can be edited via user interaction.

Collapse M_MOVABLE +

Inquires whether a graphic can be moved via user interaction in an interactive display. If a graphic is not visible, not selectable, or not editable, it is not movable and this setting is ignored. SET

(summarize)
Collapse M_DISABLE

Specifies that the graphic cannot be moved via user interaction. INFO

Collapse M_ENABLE

Specifies that the graphic can be moved via user interaction by clicking and dragging the graphic, its selection box, or its center handle.

Collapse M_RESIZABLE +

Inquires whether a graphic can be resized via user interaction in an interactive display. If a graphic is not visible, not selectable, or not editable, it is not resizable and this setting is ignored. SET

(summarize)
Collapse M_DISABLE

Specifies that the graphic cannot be resized via user interaction and the resize handles will not be displayed if a graphic is selected. INFO

Collapse M_ENABLE

Specifies that the graphic can be resized via user interaction by clicking and dragging one of the resize handles.

Collapse M_ROTATABLE +

Inquires whether a graphic can be rotated via user interaction in an interactive display. If a graphic is not visible, not selectable, or not editable, it is not rotatable and this setting is ignored. SET

(summarize)
Collapse M_DISABLE

Specifies that the graphic cannot be rotated via user interaction and the rotate handle will not be displayed if a graphic is selected. INFO

Collapse M_ENABLE

Specifies that the graphic can be rotated via user interaction by clicking and dragging the rotation handle.

Collapse M_SELECTABLE +

Inquires whether a graphic in a graphics list can be selected via user interaction in an interactive display. If a graphic is not visible, it is not selectable and this setting is ignored. SET

(summarize)
Collapse M_DISABLE

Specifies that the graphic cannot be selected via user interaction. INFO

Collapse M_ENABLE

Specifies that the graphic can be selected by clicking on it.

Collapse M_SPECIFIC_FEATURES_EDITABLE +

Inquires whether a graphic can be modified via user interaction in an interactive display using handles that are specific to its graphic type. If a graphic is not visible, not selectable, or not editable, it cannot be modified using its type-specific handles and this setting is ignored. SET

(summarize)
Collapse M_DISABLE

Specifies that the graphic cannot be modified via user interaction and its specific feature handles will not be displayed if a graphic is selected. INFO

Collapse M_ENABLE

Specifies that the graphic can be modified via user interaction by clicking and dragging one of the specific feature handles.

Collapse M_VISIBLE +

Inquires whether a graphic is rendered on the display. SET

(summarize)
Collapse M_FALSE

Specifies that the graphic is not rendered.

Collapse M_TRUE

Specifies that the graphic is rendered.

To inquire graphics context settings that apply only to text (MgraText()), the InquireType parameter should be set to one of the following values.

Unless otherwise specified, the following values require that you pass the UserVarPtr parameter the address of a MIL_INT.

function map For inquiring about a setting specific to text
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_BACKCOLOR +

Inquires the background color. SET SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse M_COLOR_BLACK

Specifies the color black.

Collapse M_COLOR_BLUE

Specifies the color blue.

Collapse M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Collapse M_COLOR_CYAN

Specifies the color cyan.

Collapse M_COLOR_DARK_BLUE

Specifies the color dark blue.

Collapse M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Collapse M_COLOR_DARK_GREEN

Specifies the color dark green.

Collapse M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Collapse M_COLOR_DARK_RED

Specifies the color dark red.

Collapse M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Collapse M_COLOR_GRAY

Specifies the color gray.

Collapse M_COLOR_GREEN

Specifies the color green.

Collapse M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Collapse M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Collapse M_COLOR_LIGHT_GREEN

Specifies the color light green.

Collapse M_COLOR_LIGHT_WHITE

Specifies the color light white.

Collapse M_COLOR_MAGENTA

Specifies the color magenta.

Collapse M_COLOR_RED

Specifies the color red.

Collapse M_COLOR_WHITE

Specifies the color white.

Collapse M_COLOR_YELLOW

Specifies the color yellow.

Collapse Byte-encoded RGB value

Specifies an encoded RGB value. To verify if the value is a byte-encoded RGB value, use the M_IS_RGB888 macro. To retrieve the R, G, and B components, use the M_RGB888_R, M_RGB888_G, and M_RGB888_B macros.

(summarize)
Collapse Value

Specifies a grayscale value. INFO

Collapse M_BACKGROUND_MODE +

Inquires whether the text's background is filled. SET

(summarize)
Collapse M_OPAQUE

Specifies that the background will be filled with the current background color before drawing text.

Collapse M_TRANSPARENT

Specifies not to change the background before drawing text. INFO

Collapse M_FONT +

Inquires the character font. SET

(summarize)
Collapse M_FONT_DEFAULT_LARGE

Specifies a large bitmap font, where each character is drawn in a 16x32 pixel area.

Collapse M_FONT_DEFAULT_MEDIUM

Specifies a medium bitmap font, where each character is drawn in a 12x24 pixel area.

Collapse M_FONT_DEFAULT_SMALL

Specifies a small bitmap font, where each character is drawn in a 8x16 pixel area.

Collapse M_FONT_TTF

Specifies a TrueType font. This value is returned when using MgraFont() with MIL_FONT_NAME().

(summarize)
Collapse M_FONT_AUTO_SELECT +

Inquires whether MIL will search for a suitable font to draw text if the currently selected font is a TrueType font that does not support the character code. SET

(summarize)
Collapse M_DISABLE

Specifies that MIL will not search for a suitable font. INFO

Collapse M_ENABLE

Specifies that MIL will search for a suitable font.

Collapse M_FONT_SIZE +

Inquires the size text is drawn when using a TrueType font. SET

(summarize)
Collapse Value >= 1

Specifies the text's font size, in points.

Collapse M_FONT_X_SCALE +

Inquires the font's horizontal scaling factor. SET SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value > 0

Specifies the factor by which to multiply the width of the font's characters. INFO

Collapse M_FONT_Y_SCALE +

Inquires the font's vertical scaling factor. SET SET

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse Value > 0

Specifies the factor by which to multiply the height of the font's characters. INFO

Collapse M_TEXT_ALIGN_HORIZONTAL +

Inquires the horizontal alignment of text. SET

(summarize)
Collapse M_CENTER

Specifies that text is horizontally centered.

Collapse M_LEFT

Specifies that text is left-aligned.

Collapse M_RIGHT

Specifies that text is right-aligned.

Collapse M_TEXT_ALIGN_VERTICAL +

Inquires the vertical alignment of text. SET

(summarize)
Collapse M_BOTTOM

Specifies that text is bottom-aligned.

Collapse M_CENTER

Specifies that text is vertically centered.

Collapse M_TOP

Specifies that text is top-aligned.

Collapse M_TEXT_BORDER +

Inquires how borders are drawn around the text.

Note that a combination of the values below can be returned. Bitwise operators must be used to verify the presence of a specific border. SET

(summarize)
Collapse M_BOTTOM

Specifies that a line is drawn underneath the text.

Collapse M_LEFT

Specifies that a line is drawn to the left of the text.

Collapse M_NONE

Specifies that no border is drawn around the text. INFO

Collapse M_RIGHT

Specifies that a line is drawn to the right of the text.

Collapse M_TOP

Specifies that a line is drawn above the text.

Collapse M_TEXT_DIRECTION +

Inquires the direction text is drawn when using a TrueType font. SET

(summarize)
Collapse M_LEFT_TO_RIGHT

Specifies that text will be drawn from left to right.

Collapse M_RIGHT_TO_LEFT

Specifies that text will be drawn from right to left.

Combination constants for M_BACKCOLOR; M_COLOR.

You can add one of the following values to the above-mentioned values to get the color used in the graphics context for a 16-bit or 32-bit multi-band buffer.

You must inquire each color component (R,G, and B) separately.

function map For inquiring the color value used (for 16- or 32-bit multi-band buffers)
CollapseCombination value Description
Collapse M_BLUE

Inquires the blue color component.

Collapse M_GREEN

Inquires the green color component.

Collapse M_RED

Inquires the red color component.

You can add one of the following values to the above-mentioned values to cast the requested information to a required data type.

function map For specifying the data type
CollapseInquireType Description
UserVarPtr
- Possible values returned
Collapse M_TYPE_MIL_DOUBLE

Casts the requested information to a MIL_DOUBLE.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_DOUBLE

Collapse M_TYPE_MIL_ID

Casts the requested information to a MIL_ID. Note that M_TYPE_MIL_ID should only be used with M_OWNER_SYSTEM and M_GRAPHIC_SOURCE_CALIBRATION.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_ID

Collapse M_TYPE_MIL_INT

Casts the requested information to a MIL_INT.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT

Collapse M_TYPE_MIL_INT32

Casts the requested information to a MIL_INT32.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT32

Collapse M_TYPE_MIL_INT64

Casts the requested information to a MIL_INT64.

(summarize)
Collapse UserVarPtr data type info

Data type: MIL_INT64

Return value
The returned value is the requested information, cast to a MIL_INT.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT COLOR COLOR BLACK COLOR BLUE COLOR BRIGHT GRAY COLOR CYAN COLOR DARK BLUE COLOR DARK CYAN COLOR DARK GREEN COLOR DARK MAGENTA COLOR DARK RED COLOR DARK YELLOW COLOR GRAY COLOR GREEN COLOR LIGHT BLUE COLOR LIGHT GRAY COLOR LIGHT GREEN COLOR LIGHT WHITE COLOR MAGENTA COLOR RED COLOR WHITE COLOR YELLOW DRAW OFFSET X DRAW OFFSET Y DRAW ZOOM X DRAW ZOOM Y FIXTURE USE DESTINATION FIRST USE SOURCE FIRST GRAPHIC CONVERSION MODE PRESERVE SHAPE AVERAGE RESHAPE FOLLOWING DISTORTION RESHAPE FROM POINTS GRAPHIC SOURCE CALIBRATION NULL INPUT UNITS DISPLAY PIXEL WORLD OWNER SYSTEM DEFAULT HOST OWNER SYSTEM TYPE SYSTEM 1394 TYPE SYSTEM CRONOSPLUS TYPE SYSTEM GIGE VISION TYPE SYSTEM GPU TYPE SYSTEM HOST TYPE SYSTEM IRIS GT TYPE SYSTEM MORPHIS TYPE SYSTEM MORPHISQXT TYPE SYSTEM ORION HD TYPE SYSTEM RADIENT TYPE SYSTEM RADIENTCLHS TYPE SYSTEM RADIENTCXP TYPE SYSTEM RADIENTEVCL TYPE SYSTEM RADIENTPRO TYPE SYSTEM SOLIOS TYPE SYSTEM USB3 VISION TYPE SYSTEM VIO TYPE EDITABLE DISABLE ENABLE MOVABLE DISABLE ENABLE RESIZABLE DISABLE ENABLE ROTATABLE DISABLE ENABLE SELECTABLE DISABLE ENABLE SPECIFIC FEATURES EDITABLE DISABLE ENABLE VISIBLE FALSE TRUE BACKCOLOR COLOR BLACK COLOR BLUE COLOR BRIGHT GRAY COLOR CYAN COLOR DARK BLUE COLOR DARK CYAN COLOR DARK GREEN COLOR DARK MAGENTA COLOR DARK RED COLOR DARK YELLOW COLOR GRAY COLOR GREEN COLOR LIGHT BLUE COLOR LIGHT GRAY COLOR LIGHT GREEN COLOR LIGHT WHITE COLOR MAGENTA COLOR RED COLOR WHITE COLOR YELLOW BACKGROUND MODE OPAQUE TRANSPARENT FONT FONT DEFAULT LARGE FONT DEFAULT MEDIUM FONT DEFAULT SMALL FONT TTF FONT AUTO SELECT DISABLE ENABLE FONT SIZE FONT X SCALE FONT Y SCALE TEXT ALIGN HORIZONTAL CENTER LEFT RIGHT TEXT ALIGN VERTICAL BOTTOM CENTER TOP TEXT BORDER BOTTOM LEFT NONE RIGHT TOP TEXT DIRECTION LEFT TO RIGHT RIGHT TO LEFT BLUE GREEN RED TYPE MIL DOUBLE TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64