BOOL DrvStrokePath(
IN SURFOBJ *pso, | |
IN PATHOBJ *ppo, | |
IN CLIPOBJ *pco, | |
IN XFORMOBJ *pxo, | |
IN BRUSHOBJ *pbo, | |
IN POINTL *pptlBrushOrg, | |
IN LINEATTRS *plineattrs, | |
IN MIX mix | |
); |
DrvStrokePath strokes a path when called by GDI. If the driver has hooked the function, and if the appropriate GCAPs are set, GDI calls DrvStrokePath when GDI draws a line or curve with any set of attributes.
The XFORMOBJ can be queried to find the transform.
The return value is TRUE if the driver is able to stroke the path. If GDI should stroke the path, the return value is FALSE, and an error code is not logged. If the driver encounters an error, the return value is DDI_ERROR, and an error code is logged.
If a driver supports this entry point, it should also support the drawing of cosmetic wide lines with arbitrary clipping. Using the provided GDI functions, the call can be broken down into a set of single-pixel-width lines with precomputed clipping.
This function is required if any drawing is to be done on a device-managed surface.
Drivers for advanced devices can optionally receive this call to draw paths containing Bezier curves and geometric wide lines. GDI will test the GCAPS_BEZIERS and GCAPS_GEOMETRICWIDE flags of the flGraphicsCaps member of the DEVINFO structure to decide whether it should call. (The four combinations of the bits determine the four levels of functionality for this call.) If the driver gets an advanced call containing Bezier curves or geometric wide lines, it can decide not to handle the call, returning FALSE. This might happen if the path or clipping is too complex for the device to process. If the call does return FALSE, GDI breaks the call down into simpler calls that can be handled easily.
For device-managed surfaces, the function must minimally support single-pixel-wide solid and styled cosmetic lines using a solid-colored brush. The device can return FALSE if the line is geometric and the engine will convert those calls to DrvFillPath or DrvPaint calls.
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.
CLIPOBJ, DEVINFO, DrvFillPath, DrvPaint, LINEATTRS, PATHOBJ, XFORMOBJ