SunPHIGS 3.0 Extensions Reference Manual
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

NAME

SET EDGE REPRESENTATION PLUS - set extended edge attribute bundle on workstation

SYNOPSIS

C Syntax

void
pset_edge_rep_plus ( ws, index, rep )
Pint                  ws;       workstation identifier
Pint                  index;    edge bundle index number
Pedge_bundle_plus     * rep;    edge representation pointer

FORTRAN Syntax

SUBROUTINE pseer ( WKID, INDEX, EFLAG, ETYPE, EWIDTH, COLMOD, IECOLR, ECOLR )
INTEGER      WKID         workstation identifier
INTEGER      INDEX        edge bundle index
INTEGER      EFLAG        edge flag (PON/POFF)
INTEGER      ETYPE        edge type
REAL         EWIDTH       edge width scale factor
INTEGER      COLMOD       colour model
INTEGER      IECOLR       indirect colour index
REAL         ECOLR(3)     direct colour value

Required PHIGS Operating States

(PHOP, WSOP, * ,* )

DESCRIPTION

Purpose

SET EDGE REPRESENTATION PLUS sets an extended edge attribute bundle on a workstation.
This is a SunPHIGS Extension function based on PHIGS PLUS and is not part of the PHIGS standard.

C Input Parameters

ws
The identifier of the workstation.
index
This is an index to the workstation edge bundle table.
rep
A pointer to a Pedge_bundle_plus structure. Pedge_bundle_plus is defined as:
typedef struct {
Pedge_flag           flag;            /* edge flag * /
Pint                type;           /* edgetype * /
Pfloat               width;          /* edgewidth scale factor * /
Pgcolr              colr;           /* edge colour * /

} Pedge_bundle_plus;
Pedge_flag is defined as:
typedef enum {
PEDGE_OFF,
PEDGE_ON
} Pedge_flag;
The edge type values are:
1   PLINE_SOLID        Solid
2   PLINE_DASH         Dashed
3   PLINE_DOT          Dotted
4   PLINE_DASH_DOT     Dot-dashed

Pgcolr is defined as:
typedef struct {
Pint
type;
/* indirect, RGB, CIE, HSV, HLS * /
union {
Pint
ind;
/* index in workstation colour
bundle table * /
struct {
             Pfloat     x;          /* red, hue, and so on * /
             Pfloat     y;          /* green, saturation, lightness,
                                       and so on * /
             Pfloat     z;          /* blue, value, saturation, and
                                       so on * /
          } general;
        } val;
} Pgcolr;

FORTRAN Input Parameters

All of the following data types are predefined in phigs77.h.
WKID
The identifier of the workstation for which the edge representation is being defined.
INDEX The index into the specified workstation edge bundle table.
EFLAG The edge flag. Predefined values are:
0
POFF
1
PON
ETYPE The edge type. Predefined values are:
1    PLSOLI             Solid
2    PLDASH             Dashed
3    PLDOT              Dotted
4    PLDASD             Dot-dashed
0    PLNLONGDASH        Long-dashed
-1   PLNDOTDASHDOT      Dot-dashed-dot-dotted
-2   PLNCENTER          Center (long-short dashed)
-3   PLNPHANTOM         Phantom (long-short-short dashed)

EWIDTH
The edge width scale factor.
COLMOD
The colour model which determines the type of colour to be used. The valid values for COLMOD are:
0   PINDIR   Indirect
1   PRGB     Red, Green, and Blue
2   PCIE     CIE Colour Model
3   PHSV     Hue, Saturation, and Value
4   PHLS     Hue, Lightness, and Saturation

IECOLR
An integer index into the workstation colour table for determining the edge colour. This value is only used if COLMOD is equal to PINDIR.
ECOLR(3)
An array of reals containing the edge colour. This array is not used if COLMOD is equal to PINDIR.
ECOLR(1) = Red, Hue, and so on
ECOLR(2) = Green, Saturation, Lightness, and so on
ECOLR(3) = Blue, Value, Saturation, and so on

Execution

In the edge bundle table of the workstation state list, the given index is associated with the specified parameters.
The edgewidth scale factor is a scale factor applied to nominal edgewidth. During structure traversal, the edgewidth scale factor is multiplied by the nominal edgewidth on a workstation. The result is mapped by the workstation to the nearest available edgewidth.
Edge colour is a general colour, either an indirect or a direct colour in a specified colour model. If an indirect colour is specified and the specified colour index is not available during structure traversal, then colour index one is used.
The extended edge bundle table in the workstation state list has predefined entries taken from the workstation description table. A number of these entries are predefined for every workstation of category OUTPUT or OUTIN. Any table entry, including the predefined entries, may be redefined with this function.
When area defining primitives are displayed during structure traversal, the current edge index in the PHIGS traversal state list refers to an entry in the extended edge bundle table. If the current edge index is not present in the extended edge bundle table, then edge index one is used. The setting of the corresponding Aspect Source Flags(ASFs) determines which aspects in the entry are used.

ERRORS

003
Ignoring function, function requires state (PHOP, WSOP, * ,* )
054
Ignoring function, the specified workstation is not open
059
Ignoring function, the specified workstation does not have output capability (that is, the workstation category is not OUTPUT, OUTIN, or MO)
100
Ignoring function, the bundle index value is less than one
103
Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table
107
Ignoring function, the specified edgetype is not available on the specified workstation
110
Ignoring function, the specified colour model is not available on the workstation
113
Ignoring function, the colour index value is less than zero

SEE ALSO

SET INDIVIDUAL ASF (3P)
INQUIRE EDGE REPRESENTATION PLUS (3PP)
SET EDGE REPRESENTATION (3P)