| MIL 10 Reference
| Customize Help
| Save Settings

MgraBackColor



See also
User Guide:
Reference:
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
Sets the background color of the graphics context.
Syntax
void MgraBackColor(
MIL_ID ContextGraId, //in
MIL_DOUBLE BackgroundColor //in
)
Description

This function sets the background color of the specified graphics context.

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 in which to set the background color. 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().

BackgroundColor INQ

Specifies the background color of a specified graphics context. This parameter must be set to one of the following values:

function map For the background color
CollapseValue Description
Collapse
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

Specifies an RGB value when using the 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)
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.

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 Value

Specifies a grayscale value.

When drawing in a 1-band buffer, the grayscale value is cast to the type of the destination buffer.

When drawing in a multi-band buffer, the grayscale value is cast to the type of the destination buffer's bands. This value will be replicated in each band.

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)
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT 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