GpiSetPel: Difference between revisions
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
This function sets a pel, at a position specified in world coordinates, using the current (line) color and mix. | This function sets a pel, at a position specified in world coordinates, using the current (line) color and mix. | ||
==Syntax== | ==Syntax== | ||
GpiSetPel(hps, pptlPoint) | GpiSetPel(hps, pptlPoint) | ||
==Parameters== | ==Parameters== | ||
; hps (HPS) - input | ;hps (HPS) - input:Presentation-space handle. | ||
:Presentation-space handle. | ;pptlPoint (PPOINTL) - input:Position in world coordinates. | ||
;pptlPoint (PPOINTL) - input | |||
:Position in world coordinates. | |||
==Returns== | ==Returns== | ||
;lHits (LONG) - returns | ;lHits (LONG) - returns:Correlation and error indicators. | ||
:Correlation and error indicators. | ::GPI_OK - Successful | ||
: | ::GPI_HITS - Correlate hits | ||
:: | ::GPI_ERROR - Error. | ||
: | |||
==Errors== | ==Errors== | ||
Possible returns from WinGetLastError | Possible returns from WinGetLastError | ||
;PMERR_INV_HPS (0x207F) | ;PMERR_INV_HPS (0x207F):An invalid presentation-space handle was specified. | ||
:An invalid presentation-space handle was specified. | ;PMERR_PS_BUSY (0x20F4):An attempt was made to access the presentation space from more than one thread simultaneously. | ||
;PMERR_PS_BUSY (0x20F4) | ;PMERR_INV_COORDINATE (0x205B):An invalid coordinate value was specified. | ||
:An attempt was made to access the presentation space from more than one thread simultaneously. | |||
;PMERR_INV_COORDINATE (0x205B) | |||
:An invalid coordinate value was specified. | |||
==Remarks== | ==Remarks== | ||
This function is subject to all the usual clipping (clip path, clip region, viewing limits, graphics field, visible region), and no error is returned if the point is subject to clipping. | This function is subject to all the usual clipping (clip path, clip region, viewing limits, graphics field, visible region), and no error is returned if the point is subject to clipping. | ||
Line 37: | Line 28: | ||
==Example Code== | ==Example Code== | ||
This function sets a pel, at a position specified in world coordinates, using the current (line) color and mix. | |||
<pre> | <pre> | ||
#define INCL_GPIBITMAPS | #define INCL_GPIBITMAPS | ||
#include <OS2.H> | #include <OS2.H> | ||
HPS hps; /* | HPS hps; /* Presentation-space handle. */ | ||
POINTL ptlPoint = {0,0}; | POINTL ptlPoint = {0,0}; | ||
GpiSetPel(hps, &ptlPoint); | GpiSetPel(hps, &ptlPoint); | ||
</pre> | </pre> | ||
Latest revision as of 11:26, 3 April 2025
This function sets a pel, at a position specified in world coordinates, using the current (line) color and mix.
Syntax
GpiSetPel(hps, pptlPoint)
Parameters
- hps (HPS) - input
- Presentation-space handle.
- pptlPoint (PPOINTL) - input
- Position in world coordinates.
Returns
- lHits (LONG) - returns
- Correlation and error indicators.
- GPI_OK - Successful
- GPI_HITS - Correlate hits
- GPI_ERROR - Error.
Errors
Possible returns from WinGetLastError
- PMERR_INV_HPS (0x207F)
- An invalid presentation-space handle was specified.
- PMERR_PS_BUSY (0x20F4)
- An attempt was made to access the presentation space from more than one thread simultaneously.
- PMERR_INV_COORDINATE (0x205B)
- An invalid coordinate value was specified.
Remarks
This function is subject to all the usual clipping (clip path, clip region, viewing limits, graphics field, visible region), and no error is returned if the point is subject to clipping.
This function is independent of drawing mode (see GpiSetDrawingMode); the effect always occurs immediately, and it is not retained even if the drawing mode is draw-and-retain or retain. (Its effect is, however, recorded in a metafile, but note that this is only successful if the metafile is replayed on a similar device, with draw drawing mode.)
Note: This function must not be used when creating SAA-conforming metafiles; see "MetaFile Resolutions" in the Presentation Manager Programming Reference for more information.
Example Code
This function sets a pel, at a position specified in world coordinates, using the current (line) color and mix.
#define INCL_GPIBITMAPS #include <OS2.H> HPS hps; /* Presentation-space handle. */ POINTL ptlPoint = {0,0}; GpiSetPel(hps, &ptlPoint);
Related Functions
- GpiQueryPel
- GpiSetAttrs
- GpiSetBackColor
- GpiSetBackMix
- GpiSetColor
- GpiSetDefAttrs
- GpiSetMix