PSDMR(3g) — Subroutines
Name
PSDMR − Associates the data mapping index with the specified parameters.
Operating States: PHOP, WSOP, ∗, ∗
PHIGS PLUS function
Syntax
PSDMR (WKID, DMI, DMM, LDR, DATREC)
Argument Data Type Access Description
---------------------------------------------------------------------------
WKID Integer Read Workstation identifier
DMI Integer Read Data mapping index
DMM Integer Read Data mapping method
LDR Integer Read Length of the data record array
DATREC(LDR) Character ∗80 Read Data record
---------------------------------------------------------------------------
Constants
Defined Argument Constant Description
---------------------------------------------------------------------------
DMM PCDM Digital PHIGS uses any colors specified
with the output primitive as the
source of color.
PSUDM Digital PHIGS maps a single data value
to a color selected from a specified
list of colors. Digital PHIGS selects
the color based on the relationship of
the data value to a specified data
range.
PSNUDM Digital PHIGS maps a single data value
to a color selected from a specified
list of colors. Digital PHIGS selects
the color based on the relationship of
the data value to a set of data
ranges.
PBUDM Digital PHIGS maps two data values to a
single color selected from one of a set
of color lists. The first value
specifies the list to use, and the
second value specifies which color to
select from that list.
PBNUDM Digital PHIGS maps two data values to a
single color selected from one of a set
of color lists. Digital PHIGS selects
the values from a specified set of data
ranges.
Color type PINDIR Indirect (indexed) color.
PRGB Direct specification of red, green,
and blue.
PCIE Direct specification in the format of
the Commission Internationale de
l’Eclairage.
PHSV Direct specification of hue,
saturation, and value.
PHLS Direct specification of hue,
lightness, and saturation.
---------------------------------------------------------------------------
Description
PSDMR associates the data mapping index with the specified parameters. The data mapping bundle table has predefined entries taken from the workstation description table. You can set any entry, including the predefined entries, with this function.
During structure traversal, Digital PHIGS uses the current data mapping index and current back data mapping index entries in the PHIGS traversal state list to select entries in the data mapping bundle table. If the entry corresponding to either of these indexes is undefined, Digital PHIGS uses the entry corresponding to index 1.
Digital PHIGS Version 3.1 does not support this function.
Data Record Information
If DMM is PCDM, the data record has the following format:
INTEGER IL = 1+∗ Number of integer elements
INTEGER IA(1) Number of source selectors (NSS)
INTEGER IA Elements 2 through NSS+1 contain source selectors
RL = 0
RA = ()
SL = 0
LSTR = ()
STR = ()
If DMM is PSUDM, the data record has the following format:
INTEGER IL = 5+∗ Number of integer elements
INTEGER IA(1) Number of source selectors (NSS)
INTEGER IA Elements 2 through NSS+1 contain source selectors
INTEGER IA(NSS+2) = Data value index
INTEGER IA(NSS+3) = Color type
INTEGER IA(NSS+4) = Number of specified color (NCV)
INTEGER RL = 2+∗ Number of real elements
REAL RA(1) = Lower range limit
REAL RA(2) = Upper range limit
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA = Elements NSS+5 through NSS+4+NCV contain the color
indexes
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(NSS+5) = Number of color value components (NCC)
RA = Elements 3 through NCC∗NCV+2 contain the color
values (for example, r1, g1, b1, r2, g2,
b2,
...
)
If DMM is PSNUDM, the data record has the following format:
INTEGER IL = 5+NSS+∗ Number of integer elements
INTEGER IA(1) Number of source selectors (NSS)
INTEGER IA Elements 2 through NSS+1 contain source
selectors
INTEGER IA(NSS+2) = Data value index
INTEGER IA(NSS+3) = Color type
INTEGER IA(NSS+4) = Number of range boundaries, or the number of the
specified color - 1 (NRB)
INTEGER RL = NRB+∗ Number of real elements
REAL RA = Elements 1 through NRB contain the range
boundary
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA = Elements NSS+5 through NSS+4+NRB+1 contain the color
indexes
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(NSS+5) = Number of color value components (NCC)
RA = Elements NRB+1 through NCC∗(NRB+1)+NRB
contain the color values (for example, r1, g1,
b1, r2, g2, b2,
...
)
If DMM is PBUDM, the data record has the following format:
INTEGER IL = 6+NSS+NCL Number of integer elements
INTEGER IA(1) Number of source selectors (NSS)
INTEGER IA Elements 2 through NSS+1 contain source
selectors
INTEGER IA(NSS+2) = Data value index 1
INTEGER IA(NSS+3) = Data value index 2
INTEGER IA(NSS+4) = Color type
INTEGER IA(NSS+5) = Number of color lists (NCL)
INTEGER IA Elements
NSS+6 through NSS+5+NCL contain end
indexes of the color lists
INTEGER RL = 4+∗ Number of real elements
REAL RA(1) = Lower limit of Ra range
REAL RA(2) = Upper limit of Ra range
REAL RA(3) = Lower limit of Rb range
REAL RA(4) = Upper limit of Rb range
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA = Elements NSS+5+NCL+1 through
NSS+5+NCL+IA(NSS+5+NCL) contain
the color indexes
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(NSS+5+NCL+1) = Number of color value components (NCC)
RA = Elements 5 through NCC∗IA(NSS+5+NCL)+4
contain the color values (for example,
r1, g1, b1, r2, g2, b2,
...
)
If DMM is PBNUDM, the data record has the following format:
INTEGER IL = 6+∗ Number of integer elements
INTEGER IA(1) Number of source selectors (NSS)
INTEGER IA Elements 2 through NSS+1 contain
source selectors
INTEGER IA(NSS+2) = Data value index
INTEGER IA(NSS+3) = Data value index 2
INTEGER IA(NSS+4) = Color type
INTEGER IA(NSS+5) = Number of Ra boundaries (NRAB)
INTEGER IA = Elements NSS+6 through NSS+5+NRAB
contain the array of end
indexes of Rb range boundaries
INTEGER RL = NRAB+IA(NSS+5+NRAB)+∗ Number of real elements
REAL RA = Elements 1 through NRAB contain
the Ra range boundary
REAL RA = Elements NRAB+1 through
NRAB+IA(NSS+5+NRAB) contain the
Rb range boundary
SL = 0
LSTR = ()
STR = ()
If the color type is PINDIR:
IA = Elements NSS+5+NRAB+1 through
NSS+4+NRAB+1+IA(NSS+5+NRAB) contain the
color indexes
If the color type is PRGB, PCIE, PHSV, or PHLS:
IA(NSS+5+NRAB+1) = Number of color value components (NCC)
RA = Elements NRAB+IA(NSS+5+NRAB)+1 through
NRAB+IA(NSS+5+NRAB)+NCC∗(IA(NSS+5+NRAB))
contain the color values (for example,
r1, g1, b1, r2, g2, b2,
...
)
See Also
PQDMF
PQDMR