GreBeginArea: Difference between revisions
Created page with "This function is simulated by a handling routine in the graphics engine. GreBeginArea indicates the beginning of a set of drawing functions that define the boundary of an ar..." |
mNo edit summary |
||
Line 1: | Line 1: | ||
This function is simulated by a handling routine in the graphics engine. | This function is simulated by a handling routine in the graphics engine. | ||
GreBeginArea indicates the beginning of a set of drawing functions that define the boundary of an area. All of the boundaries of the area are considered to be part of the interior and are filled. This function can be hooked by the presentation driver. | GreBeginArea indicates the beginning of a set of drawing functions that define the boundary of an area. All of the boundaries of the area are considered to be part of the interior and are filled. This function can be hooked by the presentation driver. | ||
==Syntax== | ==Syntax== | ||
GreBeginArea (hdc, flOptions, pInstance, lFunction) | |||
==Parameters== | ==Parameters== | ||
; hdc (HDC) - input : Device context handle. | ;hdc (HDC) - input : Device context handle. | ||
;flOptions (ULONG) - input : These flags designate whether the boundary is drawn and what the drawing mode is. | |||
; flOptions (ULONG) - input : These flags designate whether the boundary is drawn and what the drawing mode is. | :The defaults are BA_NOBOUNDARY and BA_ALTERNATE. | ||
::BA_NOBOUNDARY Do not draw boundary lines. | |||
::BA_BOUNDARY Draw boundary lines. | |||
::BA_NOBOUNDARY Do not draw boundary lines. | ::BA_ALTERNATE Alternate mode. | ||
::BA_BOUNDARY Draw boundary lines. | ::BA_WINDING Winding mode. | ||
::BA_ALTERNATE Alternate mode. | ::BA_EXCL Fill exclusive of bottom and right border in device coordinate. New on graphical engine versions 236 and later. | ||
::BA_WINDING Winding mode. | ;pInstance (PVOID) - input : Pointer to instance data. | ||
::BA_EXCL Fill exclusive of bottom and right border in device coordinate. New on graphical engine versions 236 and later. | ;lFunction (ULONG) - input : High-order WORD=flags; low order WORD=NGreBeginArea. | ||
; pInstance (PVOID) - input : Pointer to instance data. | |||
; lFunction (ULONG) - input : High-order WORD=flags; low order WORD=NGreBeginArea. | |||
==Return Code== | ==Return Code== | ||
; fSuccess (BOOL) - returns : This function returns BOOLEAN (fSuccess). | ;fSuccess (BOOL) - returns : This function returns BOOLEAN (fSuccess). | ||
::Area correlation hits are returned at End Area time. No hits are returned for primitives, such as lines and arcs, that form part of the area definition. | |||
::Area correlation hits are returned at End Area time. No hits are returned for primitives, such as lines and arcs, that form part of the area definition. | ::TRUE Successful | ||
::TRUE Successful | ::FALSE Error Possible | ||
::FALSE Error Possible | :Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include: | ||
::PMERR_ALREADY_IN_AREA | |||
::PMERR_BASE_ERROR | |||
::PMERR_ALREADY_IN_AREA | ::PMERR_COORDINATE_OVERFLOW | ||
::PMERR_BASE_ERROR | ::PMERR_DEV_FUNC_NOT_INSTALLED | ||
::PMERR_COORDINATE_OVERFLOW | ::PMERR_HDC_BUSY | ||
::PMERR_DEV_FUNC_NOT_INSTALLED | ::PMERR_INV_AREA_CONTROL | ||
::PMERR_HDC_BUSY | ::PMERR_INV_COORD_SPACE | ||
::PMERR_INV_AREA_CONTROL | ::PMERR_INV_HDC | ||
::PMERR_INV_COORD_SPACE | ::PMERR_INV_IN_PATH | ||
::PMERR_INV_HDC | ::PMERR_INV_LENGTH_OR_COUNT | ||
::PMERR_INV_IN_PATH | ::PMERR_PATH_LIMIT_EXCEEDED | ||
::PMERR_INV_LENGTH_OR_COUNT | :Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation. | ||
::PMERR_PATH_LIMIT_EXCEEDED | |||
==Remarks== | ==Remarks== | ||
GreBeginArea has no direct effect on current position, although it can be affected by drawing orders within the boundary definition. When GreBoxxxx or GreFullArcxxx functions are used within an area definition, they generate closed figures and must not be used within another figure definition. For more information, see "GpiBeginArea" in the Presentation Manager Programming Reference. | GreBeginArea has no direct effect on current position, although it can be affected by drawing orders within the boundary definition. When GreBoxxxx or GreFullArcxxx functions are used within an area definition, they generate closed figures and must not be used within another figure definition. For more information, see "GpiBeginArea" in the Presentation Manager Programming Reference. | ||
The following functions are valid when received after GreBeginArea and before GreEndArea: | The following functions are valid when received after GreBeginArea and before GreEndArea: | ||
Line 53: | Line 44: | ||
* GreAreaSetAttributes (valid only for color, mix, and valid line attributes) | * GreAreaSetAttributes (valid only for color, mix, and valid line attributes) | ||
* GreBoxBoundary | * GreBoxBoundary | ||
* GreDeviceSetAttributes (valid only for color, mix, and valid line attributes) | * GreDeviceSetAttributes (valid only for color, mix, and valid line attributes) | ||
* GreDeviceSetGlobalAttribute (valid only for foreground color and mix) | |||
* GreFullArcBoundary | * GreFullArcBoundary | ||
* GrePartialArc | * GrePartialArc | ||
Line 62: | Line 54: | ||
* GreQueryCharStringPos | * GreQueryCharStringPos | ||
* GreQueryTextBox | * GreQueryTextBox | ||
* GreSetArcParameters | * GreSetArcParameters | ||
* GreSetAttributes (valid only for color, mix, and valid line attributes) | * GreSetAttributes (valid only for color, mix, and valid line attributes) | ||
* GreSetCurrentPosition | * GreSetCurrentPosition |
Revision as of 18:55, 19 February 2019
This function is simulated by a handling routine in the graphics engine.
GreBeginArea indicates the beginning of a set of drawing functions that define the boundary of an area. All of the boundaries of the area are considered to be part of the interior and are filled. This function can be hooked by the presentation driver.
Syntax
GreBeginArea (hdc, flOptions, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- flOptions (ULONG) - input
- These flags designate whether the boundary is drawn and what the drawing mode is.
- The defaults are BA_NOBOUNDARY and BA_ALTERNATE.
- BA_NOBOUNDARY Do not draw boundary lines.
- BA_BOUNDARY Draw boundary lines.
- BA_ALTERNATE Alternate mode.
- BA_WINDING Winding mode.
- BA_EXCL Fill exclusive of bottom and right border in device coordinate. New on graphical engine versions 236 and later.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low order WORD=NGreBeginArea.
Return Code
- fSuccess (BOOL) - returns
- This function returns BOOLEAN (fSuccess).
- Area correlation hits are returned at End Area time. No hits are returned for primitives, such as lines and arcs, that form part of the area definition.
- TRUE Successful
- FALSE Error Possible
- Errors Detected: When an error is detected, the handling routine must call WinSetErrorInfo to post the condition. Error codes for conditions that the handling routine is expected to check include:
- PMERR_ALREADY_IN_AREA
- PMERR_BASE_ERROR
- PMERR_COORDINATE_OVERFLOW
- PMERR_DEV_FUNC_NOT_INSTALLED
- PMERR_HDC_BUSY
- PMERR_INV_AREA_CONTROL
- PMERR_INV_COORD_SPACE
- PMERR_INV_HDC
- PMERR_INV_IN_PATH
- PMERR_INV_LENGTH_OR_COUNT
- PMERR_PATH_LIMIT_EXCEEDED
- Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.
Remarks
GreBeginArea has no direct effect on current position, although it can be affected by drawing orders within the boundary definition. When GreBoxxxx or GreFullArcxxx functions are used within an area definition, they generate closed figures and must not be used within another figure definition. For more information, see "GpiBeginArea" in the Presentation Manager Programming Reference.
The following functions are valid when received after GreBeginArea and before GreEndArea:
- GreArc
- GreAreaSetAttributes (valid only for color, mix, and valid line attributes)
- GreBoxBoundary
- GreDeviceSetAttributes (valid only for color, mix, and valid line attributes)
- GreDeviceSetGlobalAttribute (valid only for foreground color and mix)
- GreFullArcBoundary
- GrePartialArc
- GrePolyFillet
- GrePolyFilletSharp
- GrePolyLine
- GrePolySpline
- GreQueryCharStringPos
- GreQueryTextBox
- GreSetArcParameters
- GreSetAttributes (valid only for color, mix, and valid line attributes)
- GreSetCurrentPosition
- GreSetGlobalAttribute (valid only for foreground color and mix)
- GreSetModelXform
Example Code
#define INCL_GRE_PATHS #include <os2.h> HDC hdc; /* Device context handle. */ ULONG flOptions; PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; BOOL fSuccess; fSuccess = GreBeginArea(hdc, flOptions, pInstance, lFunction);