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.
Type | Name | Description |
---|---|---|
GR_GC_ID | gc | The ID of the graphics context to modify. |
int | mode | The 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
Value | Description |
---|---|
GR_MODE_SET | When drawing the graphic output will represent the selected forground color. |
GR_MODE_XOR | When drawing the graphic output will be th XOR of the GC's foreground color and the current color on the drawable. |
GR_MODE_OR | When drawing the graphic output will be th OR of the GC's foreground color and the current color on the drawable. |
GR_MODE_AND | When drawing the graphic output will be th AND of the GC's foreground color and the current color on the drawable. |
GR_MODE_DRAWMASK | Set 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_EXCLUDECHILDREN | If 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. |