DrvRealizeBrush (Windows CE 5.0)
This function requests that the driver realize a specified brush for a specified surface.
BOOL DrvRealizeBrush( BRUSHOBJ* pbo, SURFOBJ* psoTarget, SURFOBJ* psoPattern, SURFOBJ* psoMask, XLATEOBJ* pxlo, ULONG iHatch );
- [in] Pointer to the BRUSHOBJ to realize. All other parameters, except for psoTarget, can be queried from this object. Parameter specifications are provided as an optimization. This parameter is best used as a parameter for BRUSHOBJ_pvAllocRBrush, which allocates the memory for the realized brush.
- [in] Pointer to the surface 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.
- [in] Pointer to the surface 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.
- [in] Pointer to 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.
- [in] Pointer to a XLATEOBJ that defines the interpretation of colors in the pattern. If pxlo is NULL, no translation is needed. A XLATEOBJ_XXX function 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.
- [in] Indicator for whether the psoPattern parameter 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.
The return value is TRUE if the brush was successfully realized. Otherwise, it is FALSE, and an error code is logged.
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.
OS Versions: Windows CE 1.0 and later.
Link 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, or Ddi_tvia5_lib.lib.
Send Feedback on this topic to the authors