次の方法で共有


Gdi::PatBlt_I (Windows Embedded CE 6.0)

1/6/2010

This method paints the given rectangle using the brush that is currently selected into the specified device context. The brush pixels and the surface pixels are combined according to the specified raster operation.

Syntax

static BOOL WINAPI PatBlt_I(
  HDC hdc, 
  int nXLeft, 
  int nYLeft, 
  int nWidth, 
  int nHeight, 
  DWORD dwRop
);

Parameters

  • hdc
    [in] Handle to the device context.
  • nXLeft
    [in] Integer that specifies the x-coordinate, in logical units, of the upper left corner of the rectangle to be filled.
  • nYLeft
    [in] Integer that specifies the y-coordinate, in logical units, of the upper left corner of the rectangle to be filled.
  • nWidth
    [in] Integer that specifies the width, in logical units, of the rectangle.
  • nHeight
    [in] Integer that specifies the height, in logical units, of the rectangle.
  • dwRop
    [in] DWORD that specifies the raster operation code.

    The following table shows the possible values.

    Value Description

    PATCOPY

    Copies the specified pattern into the destination bitmap.

    PATINVERT

    Combines the colors of the specified pattern with the colors of the destination rectangle by using the Boolean OR operator.

    DSTINVERT

    Inverts the destination rectangle.

    BLACKNESS

    Fills the destination rectangle using the color associated with index 0 in the physical palette.

    This color is black for the default physical palette.

    WHITENESS

    Fills the destination rectangle using the color associated with index 1 in the physical palette.

    This color is white for the default physical palette.

Return Value

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

This method is an internal version of the PatBlt function.

The values of the dwRop parameter for this method are a limited subset of the full 256 ternary raster-operation codes; in particular, you cannot use an operation code that refers to a source rectangle.

Not all devices support the Gdi::PatBlt_I function. For more information, see the description of the RC_BITBLT capability in the Gdi::GetDeviceCaps_I method.

Requirements

Header gdi.hpp
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

Gdi
PatBlt
Gdi::BitBlt_I
Gdi::GetDeviceCaps_I