MIL_ID ContextGraId, | //in |
MIL_INT64 ControlType, | //in |
MIL_DOUBLE ControlValue | //in |
This function allows you to control the specified 2D graphics context setting. Most of the control type settings can be inquired using MgraInquire(). To control a 2D graphics list, use MgraControlList().
Specifies the identifier of the 2D graphics context to control. This parameter must be set to one of the following:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the default 2D graphics context of the current MIL application is used. Note that there is a different default 2D graphics context for each thread. (summarize)Specifies that the default 2D graphics context of the current MIL application is used. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies a valid 2D graphics context identifier, which you have allocated using MgraAlloc(). |
Specifies the 2D graphics context setting to control.
See the Parameter associations section for possible values that can be specified.
Specifies the value to assign to the 2D 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 general 2D graphics context settings. Unless otherwise specified, these affect all types of graphics.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the foreground color. INQ (summarize)Sets the foreground color. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an RGB value when using the 2D graphics context to draw in an 8-bit, 3-band buffer. The red, green, and blue values must be values 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 MgraControl() with M_COLOR combined with the appropriate constant (M_RED, M_GREEN, or M_BLUE). (summarize)Specifies an RGB value when using the 2D graphics context to draw in an 8-bit, 3-band buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
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. 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)Specifies a grayscale value. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Sets how to draw (render) an arrow pointing in the direction with which a graphic was defined. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Same as M_NONE. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that no direction is drawn. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Specifies to draw an arrow showing the primary direction of the graphic. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to draw an arrow showing both the primary and secondary direction of the graphic. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Specifies to draw an arrow showing the secondary direction of the graphic. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Sets the offset to subtract from the source X-coordinates before rendering the graphic. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. 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)Sets the offset to subtract from the source Y-coordinates before rendering the graphic. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. This value is useful to zoom drawings of results. INQ (summarize)Sets the scale factor in the X-direction. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. This value is useful to zoom drawings of results. INQ (summarize)Sets the scale factor in the Y-direction. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the default value; the default value is 1.0. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the scale factor in the Y-direction. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets which 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 of 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)Sets which 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 (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. This is the default value. (summarize)Specifies that the camera calibration information of the destination is used when rendering the graphic. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Specifies that the camera calibration information of the graphic, set with M_GRAPHIC_SOURCE_CALIBRATION, is used when rendering the graphic. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)Sets how the shape of a graphic, defined in world units, is converted to pixels (rendered). INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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()). ![]() Specifies to render the graphic so that its shape is preserved, even if it means not respecting the camera calibration information exactly. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. ![]() Specifies that all points along the contour of the graphic will be converted using the camera calibration information, following any non-linear distortion. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. 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. ![]() This is the default value. (summarize)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. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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)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 (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. This is the default value. (summarize)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. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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 2D graphics context, not copied. If, for example, the relative coordinate system changes after using M_GRAPHIC_SOURCE_CALIBRATION, it will be reflected in the camera calibration information that is used. (summarize)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 2D graphics context, not copied. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the units with which to interpret the graphic's position and dimensional information. This essentially sets the input coordinate system to use. INQ (summarize)Sets the units with which to interpret the graphic's position and dimensional information. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to interpret the values in pixel units that, unlike M_PIXEL, are not altered when the display is panned or zoomed. This can be useful if, for example, you always want to display the camera's current frame rate at the top-left corner. M_DISPLAY must only be specified when drawing in a 2D graphics list and the 2D graphics list is used to annotate the display non-destructively, using MdispControl() with M_ASSOCIATED_GRAPHIC_LIST_ID. (summarize)Specifies to interpret the values in pixel units that, unlike M_PIXEL, are not altered when the display is panned or zoomed. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. If you are drawing in a 2D graphics list and the 2D graphics list is used to annotate the display non-destructively (M_ASSOCIATED_GRAPHIC_LIST_ID), the graphic will be zoomed and panned according to the display's zoom and pan settings. This is not the case when setting the units to M_DISPLAY, which also uses pixel units. This is the default value. (summarize)Specifies to interpret the values in pixel units, with respect to the pixel coordinate system. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies to interpret the values in world units, with respect to the relative coordinate system. If you are drawing in a 2D graphics list and the 2D graphics list is used to annotate the display non-destructively (M_ASSOCIATED_GRAPHIC_LIST_ID), the graphic will be zoomed and panned according to the display's zoom and pan settings. When using M_WORLD, a graphic's coordinates are interpreted as real-world values and transformed to pixel values before being drawn or associated with the display non-destructively. Note that using the camera calibration information associated with the image (M_WORLD), ensures that whenever the relative coordinate system moves (for example, with McalRelativeOrigin(), McalSetCoordinateSystem(), or McalFixture()), the non-destructive annotations move accordingly. In this case, the position of the graphics is set according to the position of the relative coordinate system. If world units are specified, drawing a graphic or calling MgraFill() generates an error if the operation is performed on an uncalibrated image and M_GRAPHIC_SOURCE_CALIBRATION is set to M_NULL. (summarize)Specifies to interpret the values in world units, with respect to the relative coordinate system. (more details...) |
The following ControlType and corresponding ControlValue parameter settings are used to change the 2D graphics context settings that affect the interactivity of a graphic, drawn in a 2D 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 2D 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. If a graphic is not visible or if it is not selectable, it is not editable and this setting is ignored. This setting applies to all types of graphics except dots (MgraDots()), text (MgraText()), sets of finite length lines (MgraLines() with M_LINE_LIST), and drawings created using a processing or analysis module draw function (M...Draw()). INQ (summarize)Sets whether a graphic can be edited via user interaction in an interactive display. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be edited via user interaction. Note that the graphic can still be modified using MgraControlList(). (summarize)Specifies that the graphic cannot be edited via user interaction. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be edited via user interaction. This is the default value. (summarize)Specifies that the graphic can be edited via user interaction. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets 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. This setting applies to all types of graphics except a dot (MgraDot()), dots (MgraDots()), text (MgraText()), sets of finite length lines (MgraLines() with M_LINE_LIST), and drawings created using a processing or analysis module draw function (M...Draw()). INQ (summarize)Sets whether a graphic can be resized via user interaction in an interactive display. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be resized via user interaction and the resize handles will not be displayed if a graphic is selected. Note that the graphic can still be resized using MgraControlList(). (summarize)Specifies that the graphic cannot be resized via user interaction and the resize handles will not be displayed if a graphic is selected. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be resized via user interaction by clicking and dragging one of the resize handles. This is the default value. (summarize)Specifies that the graphic can be resized via user interaction by clicking and dragging one of the resize handles. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets 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. This setting applies to all types of graphics except a dot (MgraDot()), dots (MgraDots()), text (MgraText()), sets of finite length lines (MgraLines() with M_LINE_LIST), and drawings created using a processing or analysis module draw function (M...Draw()). INQ (summarize)Sets whether a graphic can be rotated via user interaction in an interactive display. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be rotated via user interaction and the rotate handle will not be displayed if a graphic is selected. Note that the graphic can still be rotated using MgraControlList(). (summarize)Specifies that the graphic cannot be rotated via user interaction and the rotate handle will not be displayed if a graphic is selected. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be rotated via user interaction by clicking and dragging the rotation handle. This is the default value. (summarize)Specifies that the graphic can be rotated via user interaction by clicking and dragging the rotation handle. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic 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. This setting applies to all graphics except dots (MgraDots()) and sets of finite length lines (MgraLines() with M_LINE_LIST). INQ (summarize)Sets whether a graphic can be selected via user interaction in an interactive display. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be selected via user interaction. Note that the selection can still be changed using MgraControlList(), but it will not be apparent on the display. (summarize)Specifies that the graphic cannot be selected via user interaction. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be selected by clicking on it. This is the default value. (summarize)Specifies that the graphic can be selected by clicking on it. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets 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. This setting applies to all types of graphics except dots (MgraDots()), text (MgraText()), sets of finite length lines (MgraLines() with M_LINE_LIST), and drawings created using a processing or analysis module draw function (M...Draw()). INQ (summarize)Sets whether a graphic can be modified via user interaction in an interactive display using handles that are specific to its graphic type. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be modified via user interaction and its specific feature handles will not be displayed if a graphic is selected. Note that the graphic can still be modified using MgraControlList(). (summarize)Specifies that the graphic cannot be modified via user interaction and its specific feature handles will not be displayed if a graphic is selected. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be modified via user interaction by clicking and dragging one of the specific feature handles. This is the default value. (summarize)Specifies that the graphic can be modified via user interaction by clicking and dragging one of the specific feature handles. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic can be moved (translated) 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. This setting applies to all types of graphics except dots (MgraDots()), text (MgraText()), sets of finite length lines (MgraLines() with M_LINE_LIST), and drawings created using a processing or analysis module draw function (M...Draw()). INQ (summarize)Sets whether a graphic can be moved (translated) via user interaction in an interactive display. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic cannot be moved via user interaction. Note that the graphic can still be moved using MgraControlList(). (summarize)Specifies that the graphic cannot be moved via user interaction. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic can be moved via user interaction by clicking and dragging the graphic, its selection box, or its center handle. This is the default value. (summarize)Specifies that the graphic can be moved via user interaction by clicking and dragging the graphic, its selection box, or its center handle. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether a graphic is rendered on the display. Note that a graphic that is not visible cannot be affected by any user interaction in an interactive display. This setting applies to all types of graphics. INQ (summarize)Sets whether a graphic is rendered on the display. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic is not rendered. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the graphic is rendered. This is the default value. (summarize)Specifies that the graphic is rendered. (more details...) |
The following ControlType and corresponding ControlValue parameter settings are used to change 2D graphics context settings that apply only to text (MgraText()).
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
ControlValue | |||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the background color. INQ (summarize)Sets the background color. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies an RGB value when using the 2D graphics context to draw in an 8-bit, 3-band buffer. The red, green, and blue values must be values 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 MgraControl() with M_BACKCOLOR combined with the appropriate constant (M_RED, M_GREEN, or M_BLUE). (summarize)Specifies an RGB value when using the 2D graphics context to draw in an 8-bit, 3-band buffer. (more details...) |
||||||||||||||||||||||||||||||||||||||
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. 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 0. 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)Specifies a grayscale value. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets whether to fill the text's background. INQ (summarize)Sets whether to fill the text's background. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that the background will be filled with the current background color before drawing text. This is the default value. (summarize)Specifies that the background will be filled with the current background color before drawing text. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies not to change the background before drawing text. This creates a transparent background for printed characters. (summarize)Specifies not to change the background before drawing text. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. MIL will first attempt to make its selection from already used fonts, and then from system fonts. INQ (summarize)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 (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL will not search for a suitable font. An error is returned if the character code cannot be drawn using the current TrueType font. (summarize)Specifies that MIL will not search for a suitable font. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that MIL will search for a suitable font. This is the default value. (summarize)Specifies that MIL will search for a suitable font. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the size to draw text when using a TrueType font. When using a bitmap font, use M_FONT_X_SCALE and M_FONT_Y_SCALE to set the font size. INQ (summarize)Sets the size to draw text when using a TrueType font. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the text's font size, in points. The default value is 12-point font. (summarize)Specifies the text's font size, in points. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the font's horizontal scaling factor. This setting only applies to bitmap fonts. For TrueType fonts, use M_FONT_SIZE to set the font size. INQ (summarize)Sets the font's horizontal scaling factor. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the factor by which to multiply the width of the font's characters. Note that using a font with a scale of 1.0 accelerates text drawing. The default value is 1.0. (summarize)Specifies the factor by which to multiply the width of the font's characters. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the font's vertical scaling factor. This setting only applies to bitmap fonts. For TrueType fonts, use M_FONT_SIZE to set the font size. INQ (summarize)Sets the font's vertical scaling factor. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the factor by which to multiply the height of the font's characters. Note that using a font with a scale of 1.0 accelerates text drawing. The default value is 1.0. (summarize)Specifies the factor by which to multiply the height of the font's characters. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the horizontal alignment of text. The alignment is relative to the point at which the text starts, as specified with MgraText(). INQ (summarize)Sets the horizontal alignment of text. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is horizontally centered. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is left-aligned. This is the default value. (summarize)Specifies that text is left-aligned. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is right-aligned. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets the vertical alignment of text. The alignment is relative to the point at which the text starts, as specified with MgraText(). INQ (summarize)Sets the vertical alignment of text. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is bottom-aligned. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is vertically centered. |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text is top-aligned. This is the default value. (summarize)Specifies that text is top-aligned. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Sets borders around the text. Note that the possible settings can be combined. For example, to draw a box around the text, specify M_TOP + M_BOTTOM + M_LEFT + M_RIGHT. INQ (summarize)Sets borders around the text. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. This setting cannot be combined with any other setting. This is the default value. (summarize)Specifies that no border is drawn around the text. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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 (summarize)Sets the direction to draw text when using a TrueType font. INQ (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies that text will be drawn from left to right. This is the default value. (summarize)Specifies that text will be drawn from left to right. (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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. |