MgraBackColor()函数

Synopsis

Sets the background color of a graphics context.

Format

void MgraBackColor(GraphContId, BackgroundColor)

MIL_ID GraphContId; Graphics context identifier
double BackgroundColor; Background drawing and text color

Description

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

The GraphContId parameter specifies the identifier of the graphics context with which to associate the background color. This parameter can be set to M_DEFAULT, in which case the default graphics context of the current MIL application is used.

The BackgroundColor parameter specifies the background color. It can be a grayscale or an RGB value.

A grayscale value can be any integer or floating-point number. If the given color 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.

To draw in true color in a color buffer (eg. 3-band RGB), you can use the following macro:

M_RGB888(red component, green component, blue component)

See also

MgraColor, MgraAlloc, MgraInquire, MgraControl

《MgraBackColor()函数》上有2条评论

评论已关闭。