GpiSetPattern: Difference between revisions
Appearance
Created page with "This function sets the current value of the pattern-symbol attribute. ==Syntax== <PRE> #define INCL_GPIPRIMITIVES →Or use INCL_GPI, INCL_PM, Also in COMMON section: #incl..." |
|||
Line 35: | Line 35: | ||
|PATSYM_HORIZ ||Horizontal pattern|| 10 | |PATSYM_HORIZ ||Horizontal pattern|| 10 | ||
|- | |- | ||
| | |PATSYM_DIAG1 ||Diagonal pattern 1, bottom left to top right ||11 | ||
|- | |||
PATSYM_DIAG1 Diagonal pattern | |PATSYM_DIAG2 ||Diagonal pattern 2, bottom left to top right ||12 | ||
1, bottom left | |- | ||
to top right | |PATSYM_DIAG3 ||Diagonal pattern 3, top left to bottom right ||13 | ||
PATSYM_DIAG2 Diagonal pattern | |- | ||
2, bottom left | |PATSYM_DIAG4 ||Diagonal pattern 4, top left to bottom right ||14 | ||
to top right | |- | ||
PATSYM_DIAG3 Diagonal pattern | |PATSYM_NOSHADE ||No shading ||15 | ||
3, top left to | |- | ||
bottom right | |PATSYM_SOLID ||Solid shading ||16 | ||
PATSYM_DIAG4 Diagonal pattern | |- | ||
4, top left to | |PATSYM_HALFTONE ||Alternate pels set on || | ||
bottom right | |- | ||
PATSYM_NOSHADE No shading 15 | |PATSYM_BLANK Blank ||(same as PATSYM_NOSHADE) || | ||
PATSYM_SOLID Solid shading 16 | |- | ||
PATSYM_HALFTONE Alternate pels | |} | ||
set on | |||
PATSYM_BLANK Blank (same as | |||
PATSYM_NOSHADE) | |||
'''Note:''' The pattern PATSYM_HALFTONE can be the same as PATSYM_DENSE4. On non bit-mapped devices it may be mapped to | '''Note:''' The pattern PATSYM_HALFTONE can be the same as PATSYM_DENSE4. On non bit-mapped devices it may be mapped to | ||
another base pattern. | another base pattern. | ||
If the specified pattern is not valid, the default (device-dependent) pattern is used. | If the specified pattern is not valid, the default (device-dependent) pattern is used. | ||
==Return Code== | ==Return Code== |
Revision as of 15:57, 5 March 2017
This function sets the current value of the pattern-symbol attribute.
Syntax
#define INCL_GPIPRIMITIVES /* Or use INCL_GPI, INCL_PM, Also in COMMON section */ #include <os2.h> HPS hps; /* Presentation-space handle. */ LONG lPatternSymbol; /* Pattern symbol. */ BOOL rc; /* Success indicator. */ rc = GpiSetPattern(hps, lPatternSymbol);
Parameters
- hps (HPS) - input
- Presentation-space handle.
- lPatternSymbol (LONG) - input
- Pattern symbol.
Identifies the shading pattern to be used to fill areas. The pattern that appears depends on the particular pattern set selected by the pattern-set attribute. A value of 0 selects the default pattern and values in the range 1 through 255 select particular patterns within the set.
Possible values if the default pattern set has been selected are shown in the following table:
Symbolic name | Description | Pattern number (see Figure under Notes) |
PATSYM_DEFAULT | The default; same as PATSYM_SOLID (unless changed with GpiSetDefAttrs). | |
PATSYM_DENSE1 through PATSYM_DENSE8 | Solid shading with decreasing density | 1 through 8 |
PATSYM_VERT | Vertical pattern 9 | 9 |
PATSYM_HORIZ | Horizontal pattern | 10 |
PATSYM_DIAG1 | Diagonal pattern 1, bottom left to top right | 11 |
PATSYM_DIAG2 | Diagonal pattern 2, bottom left to top right | 12 |
PATSYM_DIAG3 | Diagonal pattern 3, top left to bottom right | 13 |
PATSYM_DIAG4 | Diagonal pattern 4, top left to bottom right | 14 |
PATSYM_NOSHADE | No shading | 15 |
PATSYM_SOLID | Solid shading | 16 |
PATSYM_HALFTONE | Alternate pels set on | |
PATSYM_BLANK Blank | (same as PATSYM_NOSHADE) |
Note: The pattern PATSYM_HALFTONE can be the same as PATSYM_DENSE4. On non bit-mapped devices it may be mapped to another base pattern. If the specified pattern is not valid, the default (device-dependent) pattern is used.
Return Code
- rc (BOOL) - returns
- Success indicator.
- TRUE Successful completion
- FALSE Error occurred.