DrvRealizeBrush function

The DrvRealizeBrush function requests that the driver realize a specified brush for a specified surface.

Syntax


BOOL DrvRealizeBrush(
  _In_     BRUSHOBJ *pbo,
  _Inout_  SURFOBJ  *psoTarget,
  _In_     SURFOBJ  *psoPattern,
  _In_opt_ SURFOBJ  *psoMask,
  _In_     XLATEOBJ *pxlo,
  _In_     ULONG    iHatch
);

Parameters

pbo [in]

Pointer to the BRUSHOBJ structure that is to be realized. All other parameters, except for psoTarget, can be queried from this object. Parameter specifications are provided as an optimization. This parameter is best used only as a parameter for BRUSHOBJ_pvAllocRbrush, which allocates the memory for the realized brush.

psoTarget [in, out]

Pointer to the SURFOBJ structure for which the brush is to be realized. This surface can be the physical surface for the device, a device format bitmap, or a standard format bitmap.

psoPattern [in]

Pointer to the SURFOBJ structure that describes the pattern for the brush. For a raster device, this is a bitmap. For a vector device, this is one of the pattern surfaces provided by DrvEnablePDEV.

psoMask [in, optional]

Pointer to a SURFOBJ structure that describes a transparency mask for the brush. This is a 1 bit per pixel bitmap that has the same extent as the pattern. A mask of zero means the pixel is considered a background pixel for the brush. (In transparent background mode, the background pixels are unaffected in a fill.) Plotters can ignore this parameter because they never draw background information.

pxlo [in]

Pointer to a XLATEOBJ structure that defines the interpretration of colors in the pattern. If pxlo is NULL, no translation is needed. A XLATEOBJ_Xxx service routine can be called to translate the colors to device color indices. Vector devices should translate color zero through the XLATEOBJ to get the foreground color for the brush.

iHatch [in]

Specifies whether psoPattern is one of the hatch brushes returned by DrvEnablePDEV. This is true if the value of this parameter is less than HS_DDI_MAX, which is defined in winddi.h.

Return value

The return value is TRUE if the brush was successfully realized. Otherwise, it is FALSE, and an error code is logged.

Remarks

To realize a brush, the driver converts a GDI brush into a form that can be used internally. A realized brush contains device-specific information needed by the device to accelerate drawing using the brush.

The driver's realization of a brush is written into the buffer allocated by a call to BRUSHOBJ_pvAllocRbrush.

DrvRealizeBrush is required for a driver that does any drawing to any surface.

Requirements

Target platform

Header

Winddi.h (include Winddi.h)

See also

BRUSHOBJ
BRUSHOBJ_pvAllocRbrush
DrvEnablePDEV
XLATEOBJ

 

 

Send comments about this topic to Microsoft

Show: