GpiSetPatternSet

This function sets the current pattern-set attribute to the specified value.

Syntax
GpiSetPatternSet(hps, lSet)

Parameters

 * hps (HPS) - input : Presentation-space handle.
 * lSet (LONG) - input : Pattern-set local identifier.
 * LCID_DEFAULT Default (can be set explicitly with GpiSetDefAttrs).
 * 1-254 Identifies a logical font or a bit map.

Return Code

 * rc (BOOL) - returns : Success indicator.
 * TRUE Successful completion
 * FALSE Error occurred.

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_PATTERN_SET_ATTR (0x20B2) : An invalid pattern set attribute value was specified or the default value was explicitly specified with GpiSetAttrs instead of using the defaults mask.
 * PMERR_INV_PATTERN_SET_FONT (0x20B3) : An attempt was made to use an unsuitable font as a pattern set.
 * PMERR_HUGE_FONTS_NOT_SUPPORTED (0x2035) : An attempt was made using GpiSetCharSet, GpiSetPatternSet, GpiSetMarkerSet, or GpiSetAttrs to select a font that is larger than the maximum size (64Kb) supported by the target device driver.

Remarks
The bit map, or character within the font selected, is used for shading. On some devices, a simplified form of the bit map, or character, is used. For example, only a subset such as the first 8 by 8 pels may be used; also on a monochrome device a color bit map is converted to monochrome.

Some fonts are not suitable, and an error is returned if an attempt is made to set them as the current pattern set. These include device fonts that cannot be used for shading, and any kind of raster font for a plotter device.

This function must not be issued in an area or path bracket.

The attribute mode (see GpiSetAttrMode) determines whether the current value of the pattern-set attribute is preserved. If the default pattern set is changed (using GpiSetDefAttrs), the initial default pattern marker set cannot be selected with GpiSetPatternSet.

Graphic Elements and Orders

 * Element Type: OCODE_GSPS : This element type is generated if the attribute mode (see GpiSetAttrMode) is set to AM_NOPRESERVE.
 * Order: Set Pattern Set


 * Element Type: OCODE_GPSPS : This element type is generated if the attribute mode is set to AM_PRESERVE.
 * Order: Push and Set Pattern Set

Example Code
This function sets the current pattern-set attribute to the logical font with id 35. 
 * 1) define INCL_GPIPRIMITIVES
 * 2) include 

HPS hps; /* Presentation-space */ /* handle. */ GpiSetPatternSet(hps, 35L); 

Related Functions

 * GpiBeginArea
 * GpiCreateLogFont
 * GpiEndArea
 * GpiQueryPatternSet
 * GpiSetAttrMode
 * GpiSetAttrs
 * GpiSetDefAttrs
 * GpiSetPattern
 * GpiSetPatternRefPoint