GreBoxInterior: Difference between revisions
Created page with "Description GreBoxInterior draws a rectangular box with one corner at the current (X,Y) position and the opposite corner at the specified (X,Y) position. The current (X,Y) pos..." |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
GreBoxInterior draws a rectangular box with one corner at the current (X,Y) position and the opposite corner at the specified (X,Y) position. The current (X,Y) position does not change. When this function occurs within an area or path definition, it generates a closed figure. GreBoxInterior must not occur within any other figure definition. | |||
This function can be hooked by the presentation driver. | This function can be hooked by the presentation driver. | ||
;Simulation support: This function is simulated by a handling routine in the graphics engine. | ;Simulation support: This function is simulated by a handling routine in the graphics engine. | ||
==Syntax== | ==Syntax== | ||
GreBoxInterior(hdc, pBox, pInstance, lFunction) | GreBoxInterior(hdc, pBox, pInstance, lFunction) | ||
==Parameters== | ==Parameters== | ||
;hdc (HDC) - input | ;hdc (HDC) - input:Device context handle. | ||
:Device context handle. | ;pBox (PPOINTL) - input:Pointer to a [[BOXDATA]] structure. | ||
;pInstance (PVOID) - input:Pointer to instance data. | |||
;pBox (PPOINTL) - input | ;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreBoxInterior. | ||
:Pointer to a BOXDATA structure. | |||
;pInstance (PVOID) - input | |||
:Pointer to instance data. | |||
;lFunction (ULONG) - input | |||
:High-order WORD=flags; low-order WORD=NGreBoxInterior. | |||
==Return Code== | ==Return Code== | ||
;rc (LONG) - returns | ;rc (LONG) - returns:On completion, this function returns an integer (cHits) indicating, where appropriate, whether correlation hits were detected. | ||
:On completion, this function returns an integer (cHits) indicating, where appropriate, whether correlation hits were detected. | |||
==Remarks== | ==Remarks== | ||
The sides of the box (before transformation) are parallel to the X-axis and Y-axis. The corners of the box can be rounded by means of quarter ellipses of the specified diameters. When the value of either diameter is 0, no rounding occurs. When the value of either diameter exceeds the length of the corresponding side, that length is used as the diameter instead. When the value of the diameters are equal to the value of the sides, the corners are rounded with a quarter circle. If the current position is (x0, y0), the box is drawn from the current position in a counterclockwise direction. This is significant when, for example, the area mode is BA_WINDING. | The sides of the box (before transformation) are parallel to the X-axis and Y-axis. The corners of the box can be rounded by means of quarter ellipses of the specified diameters. When the value of either diameter is 0, no rounding occurs. When the value of either diameter exceeds the length of the corresponding side, that length is used as the diameter instead. When the value of the diameters are equal to the value of the sides, the corners are rounded with a quarter circle. If the current position is (x0, y0), the box is drawn from the current position in a counterclockwise direction. This is significant when, for example, the area mode is BA_WINDING. | ||
When correlating, the handling routine records a hit when the pick aperture intersects, or is completely within, the interior (even if the mix used for the fill operation is LEAVEALONE). | |||
==Sample Code== | ==Sample Code== | ||
<PRE> | <PRE> |
Latest revision as of 02:32, 24 March 2020
GreBoxInterior draws a rectangular box with one corner at the current (X,Y) position and the opposite corner at the specified (X,Y) position. The current (X,Y) position does not change. When this function occurs within an area or path definition, it generates a closed figure. GreBoxInterior must not occur within any other figure definition.
This function can be hooked by the presentation driver.
- Simulation support
- This function is simulated by a handling routine in the graphics engine.
Syntax
GreBoxInterior(hdc, pBox, pInstance, lFunction)
Parameters
- hdc (HDC) - input
- Device context handle.
- pBox (PPOINTL) - input
- Pointer to a BOXDATA structure.
- pInstance (PVOID) - input
- Pointer to instance data.
- lFunction (ULONG) - input
- High-order WORD=flags; low-order WORD=NGreBoxInterior.
Return Code
- rc (LONG) - returns
- On completion, this function returns an integer (cHits) indicating, where appropriate, whether correlation hits were detected.
Remarks
The sides of the box (before transformation) are parallel to the X-axis and Y-axis. The corners of the box can be rounded by means of quarter ellipses of the specified diameters. When the value of either diameter is 0, no rounding occurs. When the value of either diameter exceeds the length of the corresponding side, that length is used as the diameter instead. When the value of the diameters are equal to the value of the sides, the corners are rounded with a quarter circle. If the current position is (x0, y0), the box is drawn from the current position in a counterclockwise direction. This is significant when, for example, the area mode is BA_WINDING.
When correlating, the handling routine records a hit when the pick aperture intersects, or is completely within, the interior (even if the mix used for the fill operation is LEAVEALONE).
Sample Code
#define INCL_GRE_ARCS #include <os2.h> HDC hdc; /* Device context handle. */ PPOINTL pBox; /* Pointer to a BOXDATA structure. */ PVOID pInstance; /* Pointer to instance data. */ ULONG lFunction; /* High-order WORD=flags; low-order WORD=NGreBoxInterior. */ LONG rc; rc = GreBoxInterior(hdc, pBox, pInstance, lFunction);