Jump to content

GreGetLineOrigin: Difference between revisions

From EDM2
Created page with "GreGetLineOrigin returns the current line style from the DC instance data and stores the current position to the address indicated by pptlXY. The presentation driver maintains..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
GreGetLineOrigin returns the current line style from the DC instance data and stores the current position to the address indicated by pptlXY. The presentation driver maintains the line style information.  
GreGetLineOrigin returns the current line style from the DC instance data and stores the current position to the address indicated by pptlXY. The presentation driver maintains the line style information.


This function must be supported by the presentation driver. GreGetLineOrigin is used to get the line style and current position simultaneously. This function call can be handled by bit-map simulation.  
This function must be supported by the presentation driver. GreGetLineOrigin is used to get the line style and current position simultaneously. This function call can be handled by bit-map simulation.


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


== Syntax ==  
== Syntax ==  
  GreGetLineOrigin(hdc, pptlXY, pInstance, lFunction);
  GreGetLineOrigin(hdc, pptlXY, pInstance, lFunction)


== Parameters ==
== Parameters ==
; hdc (HDC) - input : Device context handle.  
; hdc (HDC) - input : Device context handle.
 
; pptlXY (P[[POINTL]]) - input : Pointer to an (X,Y) coordinate pair to which the current position is returned.
; pptlXY (PPOINTL) - input : Pointer to an (X,Y) coordinate pair to which the current position is returned.  
; pInstance (PVOID) - input : Pointer to instance data.
 
; lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreGetLineOrigin.
; pInstance (PVOID) - input : Pointer to instance data.  
 
; lFunction (ULONG) - input : High-order WORD=flags; low-order WORD=NGreGetLineOrigin.  


== Returns ==
== Returns ==
; rc (LONG) - returns : Return Code.  
; rc (LONG) - returns : Return Code.
 
On completion, this function returns the style number (lStyle), or GPI_ALTERROR if an error occurs.
On completion, this function returns the style number (lStyle), or GPI_ALTERROR if an error occurs.  
 
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_INV_HDC
 
Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.
 
 
== Sample ==
<pre>
#define INCL_GRE_DEVMISC3
#include <os2.h>
 
HDC        hdc;        /*  Device context handle. */
PPOINTL    pptlXY;    /*  Pointer to an (X,Y) coordinate pair to which the current position is returned. */
PVOID      pInstance;  /*  Pointer to instance data. */
ULONG      lFunction;  /*  High-order WORD=flags; low-order WORD=NGreGetLineOrigin. */
LONG      rc;        /*  Return Code. */


rc = GreGetLineOrigin(hdc, pptlXY, pInstance, lFunction);
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
</pre>
* PMERR_INV_HDC
Refer to the "Error Explanations" section in the ''Presentation Manager Programming Reference'' for further explanation.


== Remarks ==
== Remarks ==
Some lines and curves can be drawn either by the presentation driver or by simulations that must be able to query and set the style as required. If COM_TRANSFORM is not set, the coordinate pair at pptlXY is returned in screen coordinates.
Some lines and curves can be drawn either by the presentation driver or by simulations that must be able to query and set the style as required. If COM_TRANSFORM is not set, the coordinate pair at pptlXY is returned in screen coordinates.
 
The high-order WORD of the style number contains the first/last pel information. If the value of this byte is 0, the first pel is not drawn. (See First and Last Pel Considerations.) The low-order byte indicates the position in the style mask. This is a count, held in the three least significant bits, of the number of positions that the style mask byte is rotated. The next byte is the state of the style error value.  


The high-order WORD of the style number contains the first/last pel information. If the value of this byte is 0, the first pel is not drawn. (See First and Last Pel Considerations.) The low-order byte indicates the position in the style mask. This is a count, held in the three least significant bits, of the number of positions that the style mask byte is rotated. The next byte is the state of the style error value.


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

Latest revision as of 12:38, 20 January 2020

GreGetLineOrigin returns the current line style from the DC instance data and stores the current position to the address indicated by pptlXY. The presentation driver maintains the line style information.

This function must be supported by the presentation driver. GreGetLineOrigin is used to get the line style and current position simultaneously. This function call can be handled by bit-map simulation.

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

Syntax

GreGetLineOrigin(hdc, pptlXY, pInstance, lFunction)

Parameters

hdc (HDC) - input
Device context handle.
pptlXY (PPOINTL) - input
Pointer to an (X,Y) coordinate pair to which the current position is returned.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreGetLineOrigin.

Returns

rc (LONG) - returns
Return Code.

On completion, this function returns the style number (lStyle), or GPI_ALTERROR if an error occurs.

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_INV_HDC

Refer to the "Error Explanations" section in the Presentation Manager Programming Reference for further explanation.

Remarks

Some lines and curves can be drawn either by the presentation driver or by simulations that must be able to query and set the style as required. If COM_TRANSFORM is not set, the coordinate pair at pptlXY is returned in screen coordinates.

The high-order WORD of the style number contains the first/last pel information. If the value of this byte is 0, the first pel is not drawn. (See First and Last Pel Considerations.) The low-order byte indicates the position in the style mask. This is a count, held in the three least significant bits, of the number of positions that the style mask byte is rotated. The next byte is the state of the style error value.