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.
GpiSetLineType (1.2)
◄Function Group► ◄Overview► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_GPIPRIMITIVES
BOOL GpiSetLineType(hps, flLineType)
HPS hps; /* presentation-space handle */
LONG flLineType; /* line type */
The GpiSetLineType function sets the current cosmetic line-type attribute to
the specified value.
Parameter Description
────────────────────────────────────────────────────────────────────────────
hps Identifies the presentation space.
flLineType Specifies the line type. If the specified line type is not
valid, the default is used. A valid line type is one of the
following:
LINETYPE_DEFAULT
LINETYPE_DOT
LINETYPE_SHORTDASH
LINETYPE_DASHDOT
LINETYPE_DOUBLEDOT
LINETYPE_LONGDASH
LINETYPE_DASHDOUBLEDOT
LINETYPE_SOLID
LINETYPE_INVISIBLE
LINETYPE_ALTERNATE
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_TYPE_ATTR
PMERR_PS_BUSY
Comments
A non-solid line type consists of a sequence of on-and-off runs that gives
the appearance of a dotted line.
This attribute specifies the cosmetic line type, which is used for all line
and curve drawing. It does not depend on transforms. For example, dashes do
not become longer if a "zoom in" occurs.
The eight standard line types are implemented on each device to give a good
appearance based on the "pel" resolution. Their definitions cannot be
changed by applications, nor can applications define additional cosmetic
line types.
The system maintains position within the line-type definition. For example,
a curve may be implemented as a polyline. However, the following functions
cause the position to be reset:
GpiCallSegmentMatrix
GpiMove
GpiPop
GpiSetCurrentPosition
GpiSetModelTransformMatrix
GpiSetPageViewport
GpiSetSegmentTransformMatrix
The attribute mode (see GpiSetAttrMode) determines whether the current value
of the line type attribute is preserved.
See Also
GpiQueryAttrs, GpiQueryLineType, GpiSetAttrMode, GpiSetAttrs,
WinGetLastError
♦