Jump to content

GreCombineShortLineRegion: Difference between revisions

From EDM2
Created page with "GreCombineShortLineRegion combines an area lying between polyshortline pairs, which is represented by a SCANDATA structure, with a region. The pScanData parameter is ORed into..."
 
Ak120 (talk | contribs)
mNo edit summary
Line 1: Line 1:
GreCombineShortLineRegion combines an area lying between polyshortline pairs, which is represented by a SCANDATA structure, with a region. The pScanData parameter is ORed into the region. This function is used to build regions for path simulation. The function always expects the points in the shortlines to be in device coordinates. An error is raised when the region specified is currently selected as the clip region.  
GreCombineShortLineRegion combines an area lying between polyshortline pairs, which is represented by a SCANDATA structure, with a region. The pScanData parameter is ORed into the region. This function is used to build regions for path simulation. The function always expects the points in the shortlines to be in device coordinates. An error is raised when the region specified is currently selected as the clip region.


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 ==  
  GreCombineShortLineRegion(hdc, hrgn, pScanData, pInstance, lFunction);
  GreCombineShortLineRegion(hdc, hrgn, pScanData, pInstance, lFunction)


== Parameters ==
== Parameters ==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
:Device context handle.  
;hrgn (HRGN) - input:Region handle.
 
;pScanData (PSCANDATA) - input:Pointer to a SCANDATA structure:
;hrgn (HRGN) - input  
::pslFirstLeft: Pointer to the left end of the first polyshortline
:Region handle.  
::pslLastLeft: Pointer the left end of the last polyshortline
 
::pslFirstRight: Pointer to right edge of first polyshortline
;pScanData (PSCANDATA) - input  
::pslLastRight: Pointer to right edge of last polyshortline
:Pointer to a SCANDATA structure:  
::c: Number of scan lines
 
::rclBound: RECTL structure defining the bounding rectangle
:;pslFirstLeft  
::slh: SHORTLINEHEADER structure:
::Pointer to the left end of the first polyshortline  
::ulStyle Line style
:;pslLastLeft  
::ulFormat Line format
::Pointer the left end of the last polyshortline  
::ptlStart (x, y) position of start
:;pslFirstRight  
::ptlStop (x, y) position of end
::Pointer to right edge of first polyshortline  
::lxLeft Left edge of bounding rectangle
:;pslLastRight  
::lxRight Right edge of bounding rectangle
::Pointer to right edge of last polyshortline  
::pslhNext Pointer to next shortline
:;c  
::pslhPrev Pointer to previous shortline
::Number of scan lines  
:;rclBound  
::RECTL structure defining the bounding rectangle  
:;slh  
::SHORTLINEHEADER structure:  
::ulStyle Line style  
::ulFormat Line format  
::ptlStart (x, y) position of start  
::ptlStop (x, y) position of end  
::lxLeft Left edge of bounding rectangle  
::lxRight Right edge of bounding rectangle  
::pslhNext Pointer to next shortline  
::pslhPrev Pointer to previous shortline  
 
::This structure is a discrete representation of a curve that starts at point (x0, y0) and ends at point (x1, y1). For each of the (y1-y0+1) rows, there is exactly one X value contained in the X array. The final point in the series is not drawn.  
::This structure is a discrete representation of a curve that starts at point (x0, y0) and ends at point (x1, y1). For each of the (y1-y0+1) rows, there is exactly one X value contained in the X array. The final point in the series is not drawn.  
:;ax  
::ax: Array of X values, as device coordinates.
::Array of X values, as device coordinates.  
;pInstance (PVOID) - input:Pointer to instance data.
 
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreCombineShortLineRegion.
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreCombineShortLineRegion.  


== Returns ==
== Returns ==
;rc (BOOL) - returns  
;rc (BOOL) - returns:This function returns BOOLEAN (fSuccess).
:This function returns BOOLEAN (fSuccess).  
::TRUE: Successful
 
::FALSE: Error
:;TRUE  
: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:
::Successful  
:*PMERR_HRGN_BUSY
:;FALSE  
:*PMERR_INSUFFICIENT_MEMORY
::Error  
:*PMERR_INV_HRGN
 
:*PMERR_REGION_IS_CLIP_REGION
: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:  
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation.
:*PMERR_HRGN_BUSY  
:*PMERR_INSUFFICIENT_MEMORY  
:*PMERR_INV_HRGN  
:*PMERR_REGION_IS_CLIP_REGION  
 
:Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.  
 


== Sample ==
== Sample ==

Revision as of 02:19, 24 March 2020

GreCombineShortLineRegion combines an area lying between polyshortline pairs, which is represented by a SCANDATA structure, with a region. The pScanData parameter is ORed into the region. This function is used to build regions for path simulation. The function always expects the points in the shortlines to be in device coordinates. An error is raised when the region specified is currently selected as the clip region.

This function can be hooked by the presentation driver.

Simulation support
This function is simulated by a handling routine in the graphics engine.

Syntax

GreCombineShortLineRegion(hdc, hrgn, pScanData, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
hrgn (HRGN) - input
Region handle.
pScanData (PSCANDATA) - input
Pointer to a SCANDATA structure:
pslFirstLeft: Pointer to the left end of the first polyshortline
pslLastLeft: Pointer the left end of the last polyshortline
pslFirstRight: Pointer to right edge of first polyshortline
pslLastRight: Pointer to right edge of last polyshortline
c: Number of scan lines
rclBound: RECTL structure defining the bounding rectangle
slh: SHORTLINEHEADER structure:
ulStyle Line style
ulFormat Line format
ptlStart (x, y) position of start
ptlStop (x, y) position of end
lxLeft Left edge of bounding rectangle
lxRight Right edge of bounding rectangle
pslhNext Pointer to next shortline
pslhPrev Pointer to previous shortline
This structure is a discrete representation of a curve that starts at point (x0, y0) and ends at point (x1, y1). For each of the (y1-y0+1) rows, there is exactly one X value contained in the X array. The final point in the series is not drawn.
ax: Array of X values, as device coordinates.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreCombineShortLineRegion.

Returns

rc (BOOL) - returns
This function returns BOOLEAN (fSuccess).
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_HRGN_BUSY
  • PMERR_INSUFFICIENT_MEMORY
  • PMERR_INV_HRGN
  • PMERR_REGION_IS_CLIP_REGION
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Sample

#define INCL_GRE_REGIONS
#include <os2.h>

HDC          hdc;        /*  Device context handle. */
HRGN         hrgn;       /*  Region handle. */
PSCANDATA    pScanData;  /*  Pointer to a SCANDATA structure: */
PVOID        pInstance;  /*  Pointer to instance data. */
ULONG        lFunction;  /*  High-order WORD=flags; low-order WORD=NGreCombineShortLineRegion. */
BOOL         rc;         /*  This function returns BOOLEAN (fSuccess). */

rc = GreCombineShortLineRegion(hdc, hrgn,
       pScanData, pInstance, lFunction);