GrSetBackgroundPixmap()

Name

GrSetBackgroundPixmap() -- Set the windows background image

Synopsis

void GrSetBackgroundPixmap ( GR_WINDOW_ID wid , GR_WINDOW_ID pixmap , int flags );

Description

This function sets the background of the window wid to display the image from pixmap. The flags parameter specifies how to draw the pixmap (centered, top-left, tiled, etc.). If the pixmap parameter is zero, the background pixmap will be disabled for the window, and the window will revert to using a solid color fill.

Parameters

TypeNameDescription
GR_WINDOW_IDwidThe ID of the window to set the background pixmap for.
GR_WINDOW_IDpixmapID of the pixmap to use as a background image.
intflagsThe pixmap drawing flags. These flags define how the pixmap should be drawn within the window. See the table below.

Table 2-1. GrSetBackgroundPixmap Flags

FlagDescription
GR_BACKGROUND_TILETile the pixmap images across the window.
GR_BACKGROUND_CENTERCenter the pixmap image in the window.
GR_BACKGROUND_TOPLEFTDraw the pixmap image in the upper left corner of the window.
GR_BACKGROUND_STRETCHStretch the pixmap image to fit the window.
GR_BACKGROUND_TRANSDon't fill in the gaps in the window.

See Also

GrNewWindow(), GrNewPixmap(), GrDrawImageToFit().