## Presentation Device Driver Reference for OS/2

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

### GreBitblt - Remarks

The device contexts can be memory DCs with bit maps selected or DCs belonging to devices that support raster operations.

When copying bits from a color bit map to a monochrome bit map or device, only those pels that are in the source background color are copied to the target as background color. All other pels are copied to the target as foreground color. Copying is nondestructive. When the target and source rectangles are in the same DC, no information is lost from the source if the rectangles overlap. When the target is expressed in world coordinates ( that is, the BBO_TARGWORLD flag is set in flOptions), the coordinates must be transformed device coordinates. The bits are transferred to an upright rectangle in device space, regardless of any rotational elements that might have been present in the transforms.

The attribute structure identified by the pBattrs parameter defines the bit -map foreground and background colors. If pBattrs is NULL, the handling routine uses the current foreground and background colors.

When the mix specified by lRop requires both source and pattern, a 3-way operation is performed by using the current pattern in the target device context. If pattern mixing is not required, a 2-way operation is done. If any of the source data is unavailable, the handling routine transfers those bits that are present and returns without error. This might occur when the source device context is a window on the screen that has been overlaid by another. In this example, the handling routine must proceed by reading what is there.

Note: The device driver may pass back Bitblt calls that call for stretching. However during the stretching, GRE will perform dithering only if the device supports more than two colors and a bit map format of more than one bit per pel in its response to a GreQueryDeviceCaps call.

A driver may alter these capabilities before returning a Bitblt call to the GRE so that dithering will (or will not) be done.