Click here to show toolbars of the Web Online Help System: show toolbars |
MIL_ID ContextGraId, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue | //in |
This function allows you to control the specified graphics context setting. Most of the control type settings can be inquired using MgraInquire(). To control a graphics list, use MgraControlList().
Specifies the identifier of the graphics context to control. This parameter must be set to one of the following:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the default graphics context of the current MIL application is used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a valid graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the graphics context setting to control.
See the Parameter associations section for possible values that can be specified.
Specifies the value to assign to the graphics context setting.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
The following ControlType and corresponding ControlValue parameter settings are used to change the graphics context settings for all types of graphics.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the foreground color. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an RGB value when using the graphics context to draw in an 8-bit, 3-band buffer. |
||||||||||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color black. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color bright gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color cyan. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark cyan. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark magenta. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark red. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark yellow. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light white. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color magenta. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color red. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color white. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color yellow. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a grayscale value. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the offset to subtract from the source X-coordinates before rendering the graphic. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0.0 pixels. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the X-coordinate offset to subtract, in pixels. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the offset to subtract from the source Y-coordinates before rendering the graphic. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 0.0 pixels. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y-coordinate offset to subtract, in pixels. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the scale factor in the X-direction. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the scale factor in the X-direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the scale factor in the Y-direction. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the scale factor in the Y-direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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). INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the camera calibration information of the destination is used when rendering the graphic. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the camera calibration information of the graphic, set with M_GRAPHIC_SOURCE_CALIBRATION, is used when rendering the graphic. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets how the shape of a graphic, defined in world units, is converted to pixels (rendered). INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to render the graphic so that its shape is preserved, even if it means not respecting the camera calibration information exactly. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that all points along the contour of the graphic will be converted using the camera calibration information, following any non-linear distortion. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that only a few key points or features will be converted using the camera calibration information; from these converted points, the rest of the graphic will be rendered respecting the shape of the graphic. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no source camera 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 camera calibration information of the drawn setting or result will be used. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the identifier of a camera calibration context, image buffer or processing or analysis module result buffer, whose camera calibration information to use; this object is only associated with the graphics context, not copied. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the units with which to interpret the graphic's position and dimensional information. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to interpret the values in pixel units that, unlike M_PIXEL, are not altered when the display is panned or zoomed. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to interpret the values in world units, with respect to the relative coordinate system. |
The following ControlType and corresponding ControlValue parameter settings are used to change the 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).
Note, you can still change these settings even if interactive mode is disabled, but they will have no effect until interactive mode is enabled. Adding a graphic that does not support one of the following settings to a graphics list will automatically assign the setting of the graphic to M_DISABLE.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be edited via user interaction in an interactive display. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be edited via user interaction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be edited via user interaction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be moved via user interaction in an interactive display. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be moved via user interaction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be moved via user interaction by clicking and dragging the graphic, its selection box, or its center handle. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be resized via user interaction in an interactive display. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be resized via user interaction and the resize handles will not be displayed if a graphic is selected. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be resized via user interaction by clicking and dragging one of the resize handles. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be rotated via user interaction in an interactive display. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be rotated via user interaction and the rotate handle will not be displayed if a graphic is selected. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be rotated via user interaction by clicking and dragging the rotation handle. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be selected via user interaction in an interactive display. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be selected via user interaction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be selected by clicking on it. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be modified via user interaction in an interactive display using handles that are specific to its graphic type. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be modified via user interaction and its specific feature handles will not be displayed if a graphic is selected. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be modified via user interaction by clicking and dragging one of the specific feature handles. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic is rendered on the display. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic is not rendered. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic is rendered. |
The following ControlType and corresponding ControlValue parameter settings are used to change graphics context settings that apply only to text (MgraText()).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the background color. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an RGB value when using the graphics context to draw in an 8-bit, 3-band buffer. |
||||||||||||||||||||||||||||||||||||||
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. |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color black. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color bright gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color cyan. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark cyan. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark magenta. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark red. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color dark yellow. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light blue. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light gray. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light green. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color light white. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color magenta. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color red. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color white. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the color yellow. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a grayscale value. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether to fill the text's background. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the background will be filled with the current background color before drawing text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies not to change the background before drawing text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether MIL should search for a suitable font to draw text if the currently selected font (MgraFont()) is a TrueType font that does not support the character code. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL will not search for a suitable font. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL will search for a suitable font. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the size to draw text when using a TrueType font. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the text's font size, in points. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the font's horizontal scaling factor. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the factor by which to multiply the width of the font's characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the font's vertical scaling factor. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the factor by which to multiply the height of the font's characters. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the horizontal alignment of text. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is horizontally centered. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is left-aligned. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is right-aligned. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the vertical alignment of text. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is bottom-aligned. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is vertically centered. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is top-aligned. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets borders around the text. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that a line is drawn underneath the text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that a line is drawn to the left of the text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no border is drawn around the text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that a line is drawn to the right of the text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that a line is drawn above the text. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the direction to draw text when using a TrueType font. INQ |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text will be drawn from left to right. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text will be drawn from right to left. |
You can add one of the following values to the above-mentioned values to specify the color component.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the blue color component. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the green color component. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the red color component. |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |