Share via


DrvAnyBlt (Windows Embedded CE 6.0)

1/6/2010

This function performs a bit-block transfer with stretching or transparency.

Syntax

BOOL DrvAnyBlt(
  SURFOBJ* psoDst,
  SURFOBJ* psoSrc,
  SURFOBJ* psoMask,
  CLIPOBJ* pco,
  XLATEOBJ* pxlo,
  POINTL* pptlHTOrg,
  RECTL* prclDst,
  POINTL* pptlSrc,
  POINTL* pptlMask,
  BRUSHOBJ* pbo,
  POINTL* pptlBrush,
  ROP4 rop4,
  ULONG iMode,
  ULONG bltFlags
);

Parameters

  • psoDst
    [in] Pointer to a SURFOBJ structure that describes the surface on which to draw.
  • psoSrc
    [in] Pointer to a SURFOBJ structure that describes the source for the bit-block transfer operation, if required by the rop4 parameter.
  • psoMask
    [in] Pointer to a SURFOBJ structure that describes a surface to be used as a mask for the rop4 parameter. The mask is a bitmap with 1 bit per pixel. Typically, a mask is used to limit the area to be modified in the destination surface. Masking is selected by setting the rop4 parameter to the value 0xAACC. The destination surface is unaffected if the mask is 0x0000.

    The mask is large enough to cover the destination rectangle.

    If this parameter is NULL and a mask is required by the rop4 parameter, the implicit mask in the brush is used.

  • pco
    [in] Pointer to a CLIPOBJ structure that limits the area to be modified. GDI functions, CLIPOBJ_XXX, enumerate the clip region as a set of rectangles. Whenever possible, GDI simplifies the clipping involved; for example, this function is never called with a single clipping rectangle. GDI clips the destination rectangle before calling this function, making additional clipping unnecessary.
  • pxlo
    [in] Pointer to an XLATEOBJ structure that specifies how color indices should be translated between the source and destination surfaces. If pxlo is NULL, no translation is needed.

    If the source surface is palette-managed, its colors are represented by indices into a lookup table of RGB values. The XLATEOBJ structure can be queried for a translate vector that will allow the device driver to translate any source index into a color index for the destination.

    The situation is more complicated when, for example, the source is RGB, but the destination is palette-managed. In this case, the closest match to each source RGB value must be found in the destination palette. The driver can call the XLATEOBJ_iXlate function to perform this operation.

    Optionally, the device driver can match colors when the target palette is the default device palette.

  • pptlHTOrg
    [in] Not used, set to NULL.
  • prclDst
    [in] Pointer to a RECTL structure that defines the area to be modified. This structure uses the coordinate system of the destination surface. The lower and right edges of this rectangle are not part of the bit-block transfer, the rectangle is lower right exclusive.

    DrvBitBlt is never called with an empty destination rectangle. The two points that define the rectangle are always well ordered. However, on multiple monitor systems the rectangle may define a region larger than the destination surface. Drivers should intersect this rectangle with their surface.

  • pptlSrc
    [in] Pointer to a POINTL structure that defines the upper left corner of the source rectangle, if a source exists. This parameter is ignored if no source exists.
  • pptlMask
    [in] Pointer to a POINTL structure that defines which pixel in the mask corresponds to the upper left corner of the source rectangle, if a source exists. This parameter is ignored if the psoMask parameter is NULL.
  • pbo
    [in] Pointer to the brush object that defines the pattern for the bit-block transfer. GDI's BRUSHOBJ_pvGetRbrush function can be used to retrieve the device's realization of the brush. This parameter is ignored if the rop4 parameter does not require a pattern.
  • pptlBrush
    [in] Pointer to a POINTL structure that defines the origin of the brush in the destination surface. The upper left pixel of the brush is aligned at this point, and the brush repeats according to its dimensions. This parameter is ignored if the rop4 parameter does not require a pattern.
  • rop4
    [in] Raster operation that defines how the mask, pattern, source, and destination pixels are combined to write to the destination surface.

    This is a quaternary raster operation, which is an extension of the ternary Rop3 operation. A Rop4 has 16 relevant bits, which are similar to the 8 defining bits of a Rop3. The simplest way to implement a Rop4 is to consider its 2 bytes separately. The low byte specifies a Rop3 that should be calculated if the mask is 1, and the high byte specifies a Rop3 that can be calculated and applied if the mask is zero.

  • iMode
    [in] Not used, set to NULL.
  • bltFlags
    [in] BLT_STRETCH to indicate a stretch blit needs to be performed, otherwise set to zero.

Return Value

DrvAnyBlt returns TRUE if the bit-block transfer operation is successful. Otherwise, the function returns FALSE, and an error code is logged.

Remarks

GDI calls this function when it needs to perform a StretchDIBits or StretchBlt operation.

GDI's CLIPOBJ_XXX functions allow the clipping to be reduced to a series of clipping rectangles. A translation vector assists in color index translation for palettes.

Do not dereference parameter pointers unless the ROP indicates they are needed. For example, unnecessarily dereferencing pbo — >iSolidColor for a ROP such as BLACKNESS can cause an access violation. This rule also applies to any function that includes a mix parameter.

Requirements

Header winddi.h
Library Ddi_ati_lib.lib, Ddi_flat_lib.lib, Ddi_gx_lib.lib, Ddi_mq200_lib.lib, Ddi_nop_lib.lib, Ddi_rflat_lib.lib, Ddi_rgx_lib.lib, Ddi_tvia5_lib.lib
Windows Embedded CE Windows CE 1.0 and later

See Also

Reference

Display Driver Functions
DrvBitBlt
XLATEOBJ

Other Resources

Display Drivers
RECTL
StretchBlt
StretchDIBits