DrvFillPath

BOOL DrvFillPath(

    IN SURFOBJ  *pso,
   IN PATHOBJ  *ppo,
   IN CLIPOBJ  *pco,
   IN BRUSHOBJ  *pbo,
   IN POINTL  *pptlBrushOrg,
   IN MIX  mix,
   IN FLONG  flOptions
  );

DrvFillPath is an optional entry point to handle the filling of closed paths.

Parameters

pso

Points to a SURFOBJ structure that defines the surface on which to draw.

ppo

Points to a PATHOBJ structure that defines the path to be filled. The PATHOBJ_Xxx service routines are provided to enumerate the lines, Bezier curves, and other data that make up the path.

pco

Points to a CLIPOBJ structure. The CLIPOBJ_Xxx service routines are provided to enumerate the clip region as a set of rectangles.

pbo

Points to a BRUSHOBJ structure that defines the pattern and colors to fill with.

pptlBrushOrg

Points to a POINTL structure that defines the brush origin, which is used to align the brush pattern on the device.

mix

Defines the foreground and background raster operations to use for the brush.

flOptions

Specifies either FP_WINDINGMODE, indicating that a winding mode fill should be performed, or FP_ALTERNATEMODE, indicating that an alternating mode fill should be performed. All other flags should be ignored.

Return Value

The return value is TRUE if the driver is able to fill the path. If the path or clipping is too complex to be handled by the driver and should be handled by GDI, the return value is FALSE, and an error code is not logged. If the driver encounters an unexpected error, such as not being able to realize the brush, the return value is DDI_ERROR, and an error code is logged.

Comments

GDI can call DrvFillPath to fill a path on a device-managed surface. When deciding whether to call this function, GDI compares the fill requirements with the following flags in the flGraphicsCaps member of the DEVINFO structure: GCAPS_BEZIERS, GCAPS_ALTERNATEFILL, and GCAPS_WINDINGFILL.

The mix mode defines how the incoming pattern should be mixed with the data already on the device surface. The MIX data type consists of two ROP2 values packed into a single ULONG. The low-order byte defines the foreground raster operation; the next byte defines the background raster operation. For more information about raster operation codes, see the Win32 SDK.

See Also

BRUSHOBJ, CLIPOBJ, DEVINFO, DrvStrokeAndFillPath, PATHOBJ, SURFOBJ