GrSetGCMode()

Name

GrSetGCMode() -- Set the drawing mode of a graphics context

Synopsis

void GrSetGCMode ( GR_GC_ID gc , int mode );

Description

This function sets the drawing mode for the specified graphics context. The mode defines how nano-X will draw pixels over each other. Generally drawi9ng is done with the GR_MODE_SET. In this case if you draw a black object you get a black object. In the other drawing modes you would get a loical combination of the black object and whatever else is already on the screen.

Parameters

TypeNameDescription
GR_GC_IDgcThe ID of the graphics context to modify.
intmodeThe new drawing mode.

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

Table 2-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

GrNewGC(), GrGetGCInfo().