| Customize Help
| Save Settings

MgraBackColor



Function Map
Synopsis
Sets the background color of the 2D graphics context.
Syntax
void MgraBackColor(
MIL_ID ContextGraId, //in
MIL_DOUBLE BackgroundColor //in
)
Description

This function sets the background color of the specified 2D 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 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
ContextGraId

Specifies the identifier of the 2D 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 2D graphics context
Click to summarizeValue Description
Click to summarize M_DEFAULT

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)
Click to summarize MIL 2D graphics context identifier

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

BackgroundColor INQ

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

function map For the background color
Click to summarizeValue Description
Click to summarize
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

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)
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 >= 0

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