## Presentation Device Driver Reference for OS/2

[prev][next][parent][TOC]

### GreBitblt Parameter - pBattrs

pBattrs (PBITBLTATTRS) - input Pointer to attributes.

Pointer to a BITBLTATTRS structure containing the attributes. The BITBLTATTRS structure consists of the following fields:

cSize Size of this structure
lColor Foreground color of source
lBackColor Background color of source

The color values are used in conversions between monochrome and color data, and are the only format conversions required. The conversions are required for:

Output of a monochrome pattern to a color device. In this case, the source pattern is converted to a color pattern. This is performed by using the colors provided in the BITBLTATTRS structure. If these colors are not provided, the handling routine uses the current area colors for the target device context. See Area (Pattern) Attributes. The bits are then transferred so that:

-Source 1s become (target area) foreground color
-Source 0s become (target area) background color

Transfer from a monochrome bit map to a color bit map or device. In this case, the source bits are converted by using the current image colors. These are the colors provided in the BITBLTATTRS structure. If these colors are not provided, the handling routine uses the current image colors for the target device context. See Image Attributes. The bits are then transferred so that:

-Source 1s become (target image) foreground color
-Source 0s become (target image) background color

Transfer from a color bit map to a monochrome bit map or device. In this case, the source bit map is converted by using the source and target image colors. The target colors are provided in the BITBLTATTRS structure. If these colors are not provided, the handling routine uses those in the image attributes bundle for the target device context. See Image Attributes. When the source is a device context, the source-image background color is that from the source DC. When the source is a bit-map handle, the background color is taken from the BITBLTATTRS structure, if provided, or from the background-image color of the target DC. The bits are then transferred so that:

-Source pels that are the source-image background color become target-image background color.

-All other pels become target-image foreground color.

When lRop does not call for a pattern, the pattern set and pattern symbol are not used. Neither the source nor the pattern is required when a bit map or part of a bit map is being cleared to a particular color. When a pattern is required, dithering can be done for solid patterns in a color that is not available on the device. Color dithering is described in GreQueryNearestColor