SET EXTENDED POLYLINE REPRESENTATION(3P+) — MISC. REFERENCE MANUAL PAGES
NAME
SET EXTENDED POLYLINE REPRESENTATION − set an extended polyline attribute bundle on a workstation
SYNOPSIS
C Syntax
void
psetextlinerep ( wsid, index, rep )
Pintwsid;workstation identifier
Pintindex;polyline bundle index
Pextlnbundl∗rep;extended polyline representation pointer
FORTRAN Syntax
SUBROUTINE pseplr ( WKID, INDEX, LTYPE, LWIDTH, COLMOD, ICOLR, COLR, METHOD,
ATYPE, AVALUE )
INTEGERWKIDworkstation identifier
INTEGERINDEXpolyline index
INTEGERLTYPElinetype
REALLWIDTHlinewidth scale factor
INTEGERCOLMODcolour model
INTEGERICOLRpolyline colour index
REALCOLR(3)colour values
INTEGERMETHODpolyline shading method
INTEGERATYPEcurve approximation type
REALAVALUEcurve approximation value
Required PHIGS Operating States
(PHOP, WSOP, ∗, ∗)
DESCRIPTION
Purpose
SET EXTENDED POLYLINE REPRESENTATION sets a bundle of extended polyline attributes for a specified entry in a workstation extended polyline bundle table.
This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard.
C Input Parameters
All of the following data types are predefined in phigs.h.
wsidThe identifier of the workstation for which the extended polyline representation is being set.
indexThe index of the entry being set.
repA pointer to a structure containing the attributes defining the extended polyline representation, defined as:
typedef struct {
Pinttype;/∗ linetype ∗/
Pfloatwidth;/∗ linewidth scale factor ∗/
Pgcolrcolour;/∗ polyline colour ∗/
Pintshading;/∗ polyline shading method ∗/
Pintapprox_type;/∗ curve approximation type ∗/
Pfloatapprox_value;/∗ curve approximation value ∗/
} Pextlnbundl;
Constants defined for linetype are:
1PLN_SOLIDSolid
2PLN_DASHDashed
3PLN_DOT Dotted
4PLN_DOTDASHDot-dashed
0PLN_LONGDASHLong-dashed
-1PLN_DOTDASHDOTDot-dashed-dot-dotted
-2PLN_CENTERCenter (long-short dashed)
-3PLN_PHANTOMPhantom (long-short-short dashed)
See SET LINETYPE in PHIGS for caveats regarding the Center and Phantom linetypes. Pgcolr is defined as:
typedef struct {
Pint type;/∗ indirect, RGB, CIE, HSV, HLS ∗/
union {
Pintindex;/∗ colour table index ∗/
struct {
Pfloatx;/∗ red, hue, etc. ∗/
Pfloaty;/∗ green, saturation, lightness, etc. ∗/
Pfloatz;/∗ blue, value, saturation, etc. ∗/
} general;
} val;
} Pgcolr;
Constants defined for colour type are:
0PINDIRECTIndirect
1PRGBRed, Green, and Blue
2PCIECIE
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation
The index member of the val union is used for type PINDIRECT. The general member is used for the other types.
Constants defined for polyline shading method are:
1PSD_NONENo Shading
2PSD_COLOURColour Interpolation Shading
Constants defined for curve approximation type are:
0PCURV_WS_DEP
1PCURV_CONSTANT_PARAMETRIC
2PCURV_CONSTANT_PARAMETRIC_BETWEEN_KNOTS
3PCURV_METRIC_WC
4PCURV_METRIC_NPC
5PCURV_CHORDAL_DEVIATION_WC
6PCURV_CHORDAL_DEVIATION_NPC
See SET CURVE APPROXIMATION CRITERIA for a description of their meaning and their use of the curve approximation value.
FORTRAN Input Parameters
All of the following data types are predefined in phigs77.h.
WKIDThe identifier of the workstation for which the extended polyline representation is being defined.
INDEX
The index of the entry being defined.
LTYPE
An integer value specifying a linetype. Constants defined for linetype are:
1PLSOLISolid
2PLDASHDashed
3PLDOTDotted
4PLDASDDot-dashed
0PLNLONGDASHLong-dashed
-1PLNDOTDASHDOTDot-dashed-dot-dotted
-2PLNCENTERCenter (long-short dashed)
-3PLNPHANTOMPhantom (long-short-short dashed)
See SET LINETYPE in PHIGS for caveats regarding the Center and Phantom linetypes.
LWIDTH
The linewidth scale factor.
COLMOD
The colour model. Constants defined for colour type are:
0PINDIRIndirect
1PRGBRed, Green, and Blue
2PCIECIE
3PHSVHue, Saturation, and Value
4PHLSHue, Lightness, and Saturation
ICOLR
An integer index into the workstation colour table for determining the line colour. This value is only used if COLMOD is equal to PINDIR.
COLR(3)
An array of reals containing the colour for the line. This array is unused if COLMOD is equal to PINDIR.
COLR(1) = Red, Hue, etc.
COLR(2) = Green, Saturation, Lightness, etc.
COLR(3) = Blue, Value, Saturation, etc.
METHOD
The polyline shading method. Constants defined for polyline shading method are:
1PSDNONNo Shading
2PSDCOLColour Interpolation Shading
ATYPE
The curve approximation type. Constants defined for curve approximation type are:
0PCAWSDWorkstation Dependent
1PCAEPConstant Parametric Subdivision
2PCAEPKConstant Parametric Subdivision Between Knots
3PCAMWMetric in WC
4PCAMNMetric in NPC
5PCACDWChordal Deviation in WC
6PCACDNChordal Deviation in NPC
See SET CURVE APPROXIMATION CRITERIA for a description of their meaning.
AVALUE
The curve approximation value. Its use is dependent upon the approximation type. See SET CURVE APPROXIMATION CRITERIA for a description of its use.
Execution
SET EXTENDED POLYLINE REPRESENTATION sets the specified extended polyline bundle table entry in the specified workstation state list. The extended polyline bundle table contains bundled entries of the PHIGS and SunPHIGS Extension polyline attributes. SET EXTENDED POLYLINE REPRESENTATION sets the individual entries of this table. During traversal, the attribute values of these bundles are used when the corresponding aspect source flag in the workstation state list is set to BUNDLED.
The PHIGS polyline bundle table is a portion of the extended table. The function SET POLYLINE REPRESENTATION sets the following attributes in the extended table: linetype, linewidth scale factor, and colour index (colour type of Indirect is assumed).
During structure traversal the current polyline index refers to an entry in the workstation extended polyline bundle table. Depending on the settings of the aspect source flags, the contents of that bundle table entry are used to determine the attributes associated with output primitives that use the extended polyline bundle table. These primitives are:
POLYLINE
POLYLINE 3
POLYLINE SET 3 WITH DATA
NON-UNIFORM B-SPLINE CURVE
GDP
(Linear Primitives)
GDP3
(Linear Primitives)
CELL ARRAY
CELL ARRAY 3
(When Performing the Minimal Simulation)
ERRORS
003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)
054Ignoring function, the specified workstation is not open
059Ignoring function, the specified workstation does not have output capability (i.e., the workstation category is neither OUTPUT, OUTIN, nor MO)
100Ignoring function, the bundle index value is less than one
103Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table
104Ignoring function, the specified linetype is not available on the specified workstation
110Ignoring function, the specified colour model is not available on the workstation
113Ignoring function, the colour index value is less than zero
605Ignoring function, the specified polyline shading method is not available on the workstation
SEE ALSO
INQUIRE EXTENDED POLYLINE FACILITIES (3P+)
SET INDIVIDUAL ASF (3P)
INQUIRE EXTENDED POLYLINE REPRESENTATION (3P+)
SET CURVE APPROXIMATION CRITERIA (3P+)
SET POLYLINE REPRESENTATION (3P)
Sun Release 4.0 — Last change: 7 July 1989