The graphics driver considers a path to be a sequence of lines, and/or curves, defined by a path object (PATHOBJ structure). To handle the filling of closed paths, the driver supports the function DrvFillPath.
GDI can call DrvFillPath to fill a path on a device-managed surface. The interface compares the requirements of the fill with the DEVINFO flags GCAPS_BEZIERS, GCAPS_ALTERNATEFILL, and GCAPS_WINDINGFILL to decide whether to call the driver. If it does, the driver either performs the operation or returns to tell GDI that the path or clipping requested is too complex to be handled by the device. In the latter case, GDI breaks the request down into several simpler operations.
A driver can also support the optional DrvStrokeAndFillPath function to fulfill requests for path fills. This function fills and strokes a path at the same time. Many GDI primitives require this functionality. If a wide line is used for stroking, the filled area must be reduced to compensate.
When the driver returns FALSE from DrvFillPath or DrvStrokeAndFillPath, GDI converts the fill-path request to a set of simpler operations and calls the driver function again. If the device returns FALSE again on the second call to DrvFillPath, GDI converts the path to a clip object and then calls DrvPaint. For a FALSE return when DrvStrokeAndFillPath is recalled, GDI can convert the call into separate DrvStrokePath and DrvPaint calls.