Jump to content

GpiSetPattern

From EDM2
Revision as of 16:38, 4 March 2017 by Martini (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 11 1, bottom left to top right PATSYM_DIAG2 Diagonal pattern 12 2, bottom left to top right PATSYM_DIAG3 Diagonal pattern 13 3, top left to bottom right PATSYM_DIAG4 Diagonal pattern 14 4, top left to bottom right 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.

Errors

Remarks

Example Code


Related Functions