GR_GC_INFO

Name

GR_GC_INFO -- Graphics context information

Synopsis

typedef struct 
{
    GR_GC_ID        gcid;
    int             mode;
    GR_REGION_ID    region;
    GR_FONT_ID      font;
    GR_COLOR        foreground;
    GR_COLOR        background;
    GR_BOOL         usebackground;
} GR_GC_INFO;
  

Description

The GR_GC_INFO structure is used to retrieve information regarding the current state of a graphics context.

Fields

TypeNameDescription
GR_GC_IDgcidThe ID of the graphics context.
intmodeThe current drawing mode of the GC.
GR_REGION_IDregionThe current drawing region of the GC.
GR_FONT_IDfontThe current font for drawing text with the GC.
GR_COLORforegroundThe current foreground color for drawing functions using the GC.
GR_COLORbackgroundThe current background color for drawing functions using the GC.
GR_BOOLusebackgroundIf GR_TRUE the window background will be drawn when an exposure event occurs. If GR_FALSE the window background will not automatically be drawn.

The following table shows the drawing modes that are available for use with graphics contexts in nano-X.

Table 3-1. Drawing Modes

ValueDescription
GR_MODE_SETWhen drawing the graphic output will represent the selected forground color.
GR_MODE_XORWhen drawing the graphic output will be th XOR of the GC's foreground color and the current color on the drawable.
GR_MODE_ORWhen drawing the graphic output will be th OR of the GC's foreground color and the current color on the drawable.
GR_MODE_ANDWhen drawing the graphic output will be th AND of the GC's foreground color and the current color on the drawable.
GR_MODE_DRAWMASKSet bits in this mask correspond to GC mode bits that define drawing style. Clear bits of this mask correspond to GC mode bits that have an extended meaning beyond the drawing style. In this table all of the preceding mode bits define drawing style, all of the following bits have an extended meaning.
GR_MODE_EXCLUDECHILDRENIf this flag is set, then while clipping child windows are excluded from the clip region. Normally the area covered by child windows is clipped when drawing on the parent window. This flag disables the normal clipping action.

See Also

GrGetGCInfo(), GrSetGCMode(), GrSetGCRegion(), GrSetGCFont(), GrSetGCForeground(), GrSetGCBackground(), GrSetGCUseBackground().