Jump to content

GreDisjointLines: Difference between revisions

From EDM2
Created page with "GreDisjointLines draws a sequence of disjoint straight lines using the end-point pairs specified. If COM_TRANSFORM is not set, the pairs are expected in screen coordinates. ..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreDisjointLines draws a sequence of disjoint straight lines using the end-point pairs specified. If COM_TRANSFORM is not set, the pairs are expected in screen coordinates.  
GreDisjointLines draws a sequence of disjoint straight lines using the end-point pairs specified. If COM_TRANSFORM is not set, the pairs are expected in screen coordinates.


This function is supported by the graphics engine and can be hooked by the presentation driver.  
This function is supported by the graphics engine and can be hooked by the presentation driver.


;Simulation support: None. This function is mandatory for all drivers.  
;Simulation support: None. This function is mandatory for all drivers.


== Syntax ==   
== Syntax ==   
  GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc);
  GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc)


== Parameters ==
== Parameters ==
;hdc (HDC) - input  
;hdc (HDC) - input:Device context handle.
:Device context handle.  
;paptlPoint (PPOINTL) - input:Pointer to an array of cPoints (X,Y) pairs.
 
:Pointer to an array of cPoints (X,Y) pairs containing the end-points for the lines.
;paptlPoint (PPOINTL) - input  
;cPoints (LONG) - input:Number of (X,Y) pairs in the points array.
:Pointer to an array of cPoints (X,Y) pairs.  
:When this is passed as 0, the handling routine takes no action except to return Success.
 
;pInstance (PVOID) - input:Pointer to instance data.
:Pointer to an array of cPoints (X,Y) pairs containing the end-points for the lines.  
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreDisjointLines.
 
;cPoints (LONG) - input  
:Number of (X,Y) pairs in the points array.  
 
:When this is passed as 0, the handling routine takes no action except to return Success.  
 
;pInstance (PVOID) - input  
;Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreDisjointLines.  


== Returns ==
== Returns ==
;rc (LONG)  
;rc (LONG):Return Codes.
:Return Codes.  
:On completion, the handling routine must return an integer (cHits) indicating, where appropriate, whether correlation hits were detected:
 
:*GPI_OK Successful
:On completion, the handling routine must return an integer (cHits) indicating, where appropriate, whether correlation hits were detected:  
:*GPI_HITS Successful with correlation hit (returned by display drivers when the correlation flag is ON, and a hit is detected)
 
:*GPI_ERROR Error
:*GPI_OK Successful  
: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:
:*GPI_HITS Successful with correlation hit (returned by display drivers when the correlation flag is ON, and a hit is detected)  
:*PMERR_BASE_ERROR
:*GPI_ERROR Error  
:*PMERR_BITMAP_NOT_SELECTED
 
:*PMERR_COORDINATE_OVERFLOW
: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_DEV_FUNC_NOT_INSTALLED
 
:*PMERR_HDC_BUSY
:*PMERR_BASE_ERROR  
:*PMERR_INV_COLOR_DATA
:*PMERR_BITMAP_NOT_SELECTED  
:*PMERR_INV_COLOR_INDEX
:*PMERR_COORDINATE_OVERFLOW  
:*PMERR_INV_COORD_SPACE
:*PMERR_DEV_FUNC_NOT_INSTALLED  
:*PMERR_INV_HDC
:*PMERR_HDC_BUSY  
:*PMERR_INV_IN_AREA
:*PMERR_INV_COLOR_DATA  
:*PMERR_INV_IN_PATH
:*PMERR_INV_COLOR_INDEX  
:*PMERR_INV_LENGTH_OR_COUNT
:*PMERR_INV_COORD_SPACE  
:*PMERR_INV_PICK_APERTURE_POSN
:*PMERR_INV_HDC  
:*PMERR_INV_RECT
:*PMERR_INV_IN_AREA  
:*PMERR_PATH_LIMIT_EXCEEDED
:*PMERR_INV_IN_PATH  
:*PMERR_PATH_UNKNOWN
:*PMERR_INV_LENGTH_OR_COUNT  
:Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation.
:*PMERR_INV_PICK_APERTURE_POSN.
:*PMERR_INV_RECT  
:*PMERR_PATH_LIMIT_EXCEEDED  
:*PMERR_PATH_UNKNOWN  
 
:Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.  


== Sample ==
== Sample ==
Line 71: Line 54:
LONG      rc;          /*  Return Codes. */
LONG      rc;          /*  Return Codes. */


GreDisjointLines(hdc, paptlPoint, cPoints,
GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc);
      pInstance, lFunction, rc);
</pre>
</pre>


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 23:54, 23 March 2020

GreDisjointLines draws a sequence of disjoint straight lines using the end-point pairs specified. If COM_TRANSFORM is not set, the pairs are expected in screen coordinates.

This function is supported by the graphics engine and can be hooked by the presentation driver.

Simulation support
None. This function is mandatory for all drivers.

Syntax

GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc)

Parameters

hdc (HDC) - input
Device context handle.
paptlPoint (PPOINTL) - input
Pointer to an array of cPoints (X,Y) pairs.
Pointer to an array of cPoints (X,Y) pairs containing the end-points for the lines.
cPoints (LONG) - input
Number of (X,Y) pairs in the points array.
When this is passed as 0, the handling routine takes no action except to return Success.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreDisjointLines.

Returns

rc (LONG)
Return Codes.
On completion, the handling routine must return an integer (cHits) indicating, where appropriate, whether correlation hits were detected:
  • GPI_OK Successful
  • GPI_HITS Successful with correlation hit (returned by display drivers when the correlation flag is ON, and a hit is detected)
  • GPI_ERROR 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_BASE_ERROR
  • PMERR_BITMAP_NOT_SELECTED
  • PMERR_COORDINATE_OVERFLOW
  • PMERR_DEV_FUNC_NOT_INSTALLED
  • PMERR_HDC_BUSY
  • PMERR_INV_COLOR_DATA
  • PMERR_INV_COLOR_INDEX
  • PMERR_INV_COORD_SPACE
  • PMERR_INV_HDC
  • PMERR_INV_IN_AREA
  • PMERR_INV_IN_PATH
  • PMERR_INV_LENGTH_OR_COUNT
  • PMERR_INV_PICK_APERTURE_POSN
  • PMERR_INV_RECT
  • PMERR_PATH_LIMIT_EXCEEDED
  • PMERR_PATH_UNKNOWN
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Sample

#define INCL_GRE_LINES
#include <os2.h>

HDC        hdc;         /*  Device context handle. */
PPOINTL    paptlPoint;  /*  Pointer to an array of cPoints (X,Y) pairs. */
LONG       cPoints;     /*  Number of (X,Y) pairs in the points array. */
PVOID      pInstance;   /*  Pointer to instance data. */
ULONG      lFunction;
LONG       rc;          /*  Return Codes. */

GreDisjointLines(hdc, paptlPoint, cPoints, pInstance, lFunction, rc);