Simulation support:
This function is simulated by a handling routine in the graphics engine.
Description
GreEndArea indicates the end of a set of drawing functions that define the boundary of an area. If the final (X,Y) position is not the same as the starting position of the last figure in the area, the handling routine must close the figure by drawing a line from the current position to the start of the final figure. Upon completion, the current (X,Y) position is the last (X,Y) position specified in the area boundary unless a closure line was drawn. In this case, the start of the last figure in the area definition becomes the current (X,Y) position.
The area fill can be built up in memory or on devices that have hardware assistance for area fill in the device. For convex figures, performance gain can be increased by recording the start and end pel positions across each scan line. Whatever algorithm is used to fill the area, the interior fill must be identical in each occurrence. If it is not identical, bit-map operations can fail to join correctly when copied to the screen.
This function can be hooked by the presentation driver.
Note: If the flOptions bit BA_EXCL (specified on the GreBeginArea call) was set on and the driver is calling the engine with fill path for simulation, the fill path flOptions parameter must have the FPATH_EXCL bit set.
#define INCL_GRE_PATHS #include <os2.h> HDC hdc; /* Device context handle. */ ULONG flCancel; PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreEndArea. */ LONG rc; /* Return codes. */ rc = GreEndArea(hdc, flCancel, pInstance, lFunction);