gpi12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
GpiSetLineWidth (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_GPIPRIMITIVES
 
BOOL GpiSetLineWidth(hps, fxLineWidth)
HPS hps;              /* presentation-space handle */
FIXED fxLineWidth;    /* line width                */
 
The GpiSetLineWidth function sets the current cosmetic line-width attribute
to the specified value. The line width specifies the width of cosmetic
lines, that is, lines drawn by functions such as GpiLine. The function
treats the line width as a multiplier for the normal line thickness for the
device.
 
If the attribute mode is AM_PRESERVE, the function saves the previous line
width on the attribute stack when it sets the new width. The previous line
width can be retrieved by using the GpiPop function.
 
Parameter    Description
────────────────────────────────────────────────────────────────────────────
 
hps          Identifies the presentation space.
 
fxLineWidth  Specifies the line-width multiplier. It must be a fixed-point
             number or one of the following values:
 
             Value              Meaning
             ───────────────────────────────────────────────────────────────
             LINEWIDTH_DEFAULT  Default
 
             LINEWIDTH_NORMAL   Normal width (1.0)
 
             Any other positive value is a multiplier on the normal line
             width. Only normal line widths are currently supported. Any
             value greater than LINEWIDTH_NORMAL will result in a warning.
 
Return Value
 
The return value is GPI_OK if the function is successful or GPI_ERROR if an
error occurred.
 
Errors
 
Use the WinGetLastError function to retrieve the error value, which may be
the following:
 
     PMERR_INV_HPS
     PMERR_INV_LINE_WIDTH_ATTR
     PMERR_PS_BUSY
     PMERR_UNSUPPORTED_ATTRIBUTE
 
Comments
 
The thickness of cosmetic lines is not affected by transformations.
 
See Also
 
GpiLine, GpiPop, GpiQueryAttrs, GpiQueryLineWidth, GpiSetAttrMode,
GpiSetAttrs, WinGetLastError