Содержащиеся в
Найти другие документы
Ресурсы поддержки
| Загрузить это руководство в формате PDF
NAME
- SET PATTERN REPRESENTATION PLUS - set extended pattern attribute bundle on workstation
SYNOPSIS
C Syntax
-
void
-
pset_pat_rep_plus ( ws, index, rep )
-
-
Pint ws; workstation identifier
Pint index; pattern bundle index
Ppat_rep_plus * rep; pattern representation pointer
FORTRAN Syntax
-
SUBROUTINE psepr ( WKID, INDEX, PROWS, PCOLS, COLMOD, IPCOLR, PCOLR )
-
-
INTEGER WKID workstation identifier
INTEGER INDEX pattern bundle index
INTEGER PROWS pattern dimensions along y-axis
INTEGER PCOLS pattern dimensions along x-axis
INTEGER COLMOD colour model
INTEGER IPCOLR indirect colour index
REAL PCOLR(3) direct colour value
Required PHIGS Operating States
- (PHOP, WSOP, * ,* )
DESCRIPTION
Purpose
- SET PATTERN REPRESENTATION PLUS sets an extended pattern 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 pattern bundle table.
-
-
rep
- A pointer to a Ppat_rep_plus structure. Ppat_rep_plus is defined as:
- typedef struct {
-
-
Pint_size dims; /* pattern's dimensions * /
Pint type; /* colour model * /
Pcoval * colr_array; /* array of colours * /
- } Ppat_rep_plus;
- Pint_size is defined as:
- typedef struct {
-
- Pint
- size_x;
- /* dimension (number of divisions)
- along X * /
-
- Pint
- size_y;
- /* dimension (number of divisions)
- along Y * /
- } Pint_size;
- Pcoval is defined as:
- typedef union {
-
- Pint
- ind;
- /* index in workstation colour
- bundle table * /
-
- Pcolr_rep
- direct;
- /* direct colour components * /
- }Pcoval;
- Pcolr_rep is defined as:
- typedef union {
-
- Prgb
- rgb;
- /* Red Green Blue colour
- specification * /
-
-
Pcieluv cieluv; /* CIE L* U* V* colour specification * /
Phls hls; /* Hue Lightness Saturation colour
specification * /
Phsv hsv; /* Hue Saturation Value colour
specification * /
Pdata unsupp; /* Colour in unsupported colour
model * /
- } Pcolr_rep;
- Prgb is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat red; /* red, hue, and so on * /
Pfloat green; /* green, saturation, lightness,
and so on * /
Pfloat blue; /* blue, value, saturation, and
so on * /
- } Prgb;
- Pcieluv is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat cieluv_x; /* x coefficient * /
Pfloat cieluv_y; /* y coefficient * /
Pfloat cieluv_y_lum; /* y luminance * /
- } Pcieluv;
- Phls is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat hue; /* hue * /
Pfloat lightness; /* lightness * /
Pfloat satur; /* saturation * /
- } Phls;
- Phsv is defined in phigs.h as follows:
- typedef struct {
-
-
Pfloat hue; /* hue * /
Pfloat satur; /* saturation * /
Pfloat value; /* value * /
- } Phsv;
- Pdata is defined in phigs.h as follows:
- typedef struct {
-
-
size_t size; /* size of data * /
char * data /* pointerto data * /
- } Pdata;
-
Note: the pset_pat_rep_plus() call is not supported by the current SunPHIGS release, but is included for portability reasons.
FORTRAN Input Parameters
- All of the following data types are predefined in phigs77.h.
-
-
WKID
- The identifier of the workstation for which the pattern representation is being defined.
-
INDEX The index into the specified workstation pattern bundle table.
-
PROWS The pattern dimensions along the y-axis.
-
PCOLS The pattern dimensions along the x-axis.
-
COLMOD
- The colour model. The predefined values are:
-
-
0 PINDIR Colour Index Specified
1 PRGB Red, Green, and Blue
2 PCIE CIE Colour Model
3 PHSV Hue, Saturation, and Value
4 PHLS Hue, Lightness, and Saturation
-
IPCOLR
- An integer index into the workstation colour table for determining pattern colour. This value is only used if COLMOD is equal to PINDIR.
-
PCOLR(3)
- An array of reals containing the pattern colour. This array is unused if COLMOD is equal to PINDIR.
- PCOLR(1 )= Red, Hue, and so on
- PCOLR(2 )= Green, Saturation, Lightness, and so on
- PCOLR(3 )= Blue, Value, Saturation, and so on
Execution
- In the pattern table of the workstation state list, the given index is associated with the specified parameters.
- A grid of DX by DY cells is specified with DX as horizontal and DY as vertical. If the colour type is indirect colour, then colour is given individually for each cell by the colour index, which is a pointer into the colour table of the workstation. Otherwise, the colour is given individually for each cell by a direct colour value in the specified colour model.
- If the workstation supports interior style PATTERN ,the pattern 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 and OUTIN supporting interior style PATTERN . This function can redefine any table entry, including the predefined ones.
- When area defining primitives are displayed during structure traversal, if the currently selected interior style is PATTERN ,then the current, or back, interior style index in the PHIGS state list refers to an entry in the extended pattern table. The selection is made either via the interior bundle or individually, depending on the corresponding Aspect Source Flags(ASFs). If the current, or back, interior style index is not present in the extended pattern table, then interior style index one is used. If interior style index one is not present, the result is workstation dependent and the interior style PATTERN is not supported for this workstation. The setting of the corresponding ASFs determines which aspects in the entry are used.
- During structure traversal, if the colour type of a specified pattern table entry is indirect colour and if a pattern colour index specified in the pattern colour array is not available on the workstation, then colour index one is 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)
-
- 103
- Ignoring function, setting this bundle table entry would exceed the maximum number of entries allowed in the workstation bundle table
-
- 110
- Ignoring function, the specified colour model is not available on the workstation
-
- 112
- Ignoring function, the pattern index value is less than one
-
- 113
- Ignoring function, the colour index value is less than zero
-
- 116
- Ignoring function, one of the dimensions of the pattern colour array is less than one
SEE ALSO
-
SET INDIVIDUAL ASF (3P)
-
INQUIRE PATTERN REPRESENTATION PLUS (3PP)
-
INQUIRE PREDEFINED PATTERN REPRESENTATION PLUS (3PP)
-
SET PATTERN REPRESENTATION (3P)
|
|