Design: 04.02.02.02/P11

This is an abstract, language-independent design. Grim details may be found in the corresponding source code. You may return to the documentation for the module containing this program design, or to the entire hierarchical table of topics covered by the PVT.


PROGRAM 11: Appearance of bundled attributes

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

MANDATORY MARKER TYPES: This screen should display examples of
each of the mandatory marker types actually supported by the
implementation.  You should not consider whether all 5 are
present, but simply whether each marker type is recognizable from
the verbal description.  Enter a list of integers which identify
the marker types in the same order as they appear in the prompt.

NON-MANDATORY REGISTERED MARKER TYPES: This screen displays a
sample of supported registered marker types (at most 8).  For
each displayed marker, look up its marker type identifier in the
ISO register and verify that the actual appearance of the marker
agrees with the ISO specification.

IMPLEMENTOR DEFINED MARKER TYPES: This screen displays a sample
of implementor defined marker types (at most 8).  For each
displayed marker, look up its marker type identifier in the
implementor's documentation and verify that the actual appearance
of the marker agrees with the specification.

VARIOUS MARKER SIZE SCALE FACTORS: Normally, several pairs of
plus signs are drawn.  Identify the pair (only one) where both
markers (plus sign) are the same size.  In case the marker size
is too large for several to fit on the screen, only one is drawn
and its size must fit within the surrounding circle.  Since this
is centered on the screen it may (validly) overlap the dialog
area.

POSITIVE MARKER SIZE BELOW MINIMUM: as above, for VARIOUS MARKER
SIZE SCALE FACTORS.

NEGATIVE MARKER SIZE: as above, for VARIOUS MARKER SIZE SCALE
FACTORS.

POSITIVE MARKER SIZE ABOVE MAXIMUM: as above, for VARIOUS MARKER
SIZE SCALE FACTORS.

MARKER SIZE OF MARKER TYPE 1: This screen displays several dots
to the right of a vertical line and one dot, the reference dot,
to the left of the line.  Count up and report the number of dots
(on the right) which are the same size as the reference dot.

DEFINED POLYMARKER COLOR INDICES: All markers but one are drawn
in the background color.  Identify the single marker drawn in the
default foreground color.

UNDEFINED POLYMARKER COLOR INDICES: A star is drawn with several
markers beneath it.  Normally, all of these will be the same
color as the star.  Count up and report the number of markers
which match the star in color.


DESIGN:

set all ASFs to BUNDLED

use <inquire polymarker facilities> to determine:
  nummt  = number of marker types
  lavsmt = list of available standard marker types
  lavrmt = list of available registered (non-mandatory) marker types
  lavimt = list of available implementor-defined marker types
           (may be derived directly from marker type value, if
            reported number of marker types < 0)
  nummw  = number of available marker-sizes
  nommw  = nominal marker-size (DC)
  minmw,maxmw = minimum,maximum marker-size (DC)

use <inquire workstation state table lengths> to determine:
   szbt = size of polymarker bundle table

*** *** ***   marker type

Use default background color=0, foreground=1

stddx = size of lavsmt
mscf = marker size scale factor = some reasonable value

for ix = 1, stddx
  <set polymarker representation>:
   index           = ix
   marker type     = ixth entry in lavsmt
   marker size     = mscf
   color           = 1
next ix

Display in random order bundles 1 thru stddx

TEST: #SR 3 4 5 6 35 36
      "The mandatory marker types (1-5) should be recognizable
       from their standard description."

OPQA/MANDATORY MARKER TYPES: List in order, the numeric labels for
  marker types: dot, plus sign, asterisk, circle, diagonal cross.

pass/fail depending on (all displayed marker types correctly identified)

regdx = size of lavrmt
if regdx < 1 skip to neg_type

numdis = min(regdx, 8, szbt)
lindis = numdis entries, randomly chosen from lavrmt

for ix = 1, numdis
   <set polymarker representation>:
      index        = ix
      marker type  = ixth entry in lindis
      marker size  = mscf
      color        = 1
next ix

display in order and label bundles 1 thru numdis

TEST: #SR 3 4 5 6 35 37
      "The registered non-mandatory marker types (> 5) should
       agree with their registered description."

OPQA/NON-MANDATORY REGISTERED MARKER TYPES: is each marker type
  depicted according to its numberic identifier's specification
  in the ISO register?

pass/fail depending on (operator responds "yes")

neg_type:

impdx = size of lavimt
if impdx < 1 skip to end_marker type

numdis = min(impdx, 8 szbt)
lindis = numdis entries, randomly chosen from lavimt

for ix = 1, numdis
   <set polymarker representation>:
      index        = ix
      marker type  = ixth entry in lindis
      marker size  = mscf
      color        = 1
next ix

display in order and label all marker types in mardis

TEST: #SR 3 4 5 6 35 38
      "Implementor-defined marker types (< 1) should agree with
       the descriptions supplied by the implementor."

OPQA/IMPLEMENTOR DEFINED MARKER TYPES: Is each marker type
  depicted according to its numeric identifier's specification in
  the implementor documentation?
pass/fail depending on (operator responds "yes")

end_marker type:

*** *** ***   marker size scale factor

from dialog common:
  wcpdc  = WC unit / DC unit
  qvis   = minimum distinguishable length in DC-units

Are there at least two visually distinguishable marker sizes?
if (nummw = 1)              or
   (maxmw <= 1.02 * minmw)  or
   (maxmw-minmw < qvis)    then
   only one distinguishable:
   tstmw1 = first marker size to be tested = maxmw
   tstmw2 = last marker size to be tested = tstmw1
   mult = 2
else
   tstmw1 = first marker size to be tested = minmw
   tstmw2 =  last marker size to be tested = maxmw
   if (nummw = 0) then
      continuous range of marker sizes available - take 4
         geometric steps
      mult = 0.9999 * ((tstmw2/tstmw1) ** 0.25)
   else
      discrete set of marker sizes available - test min/max only
      mult = 0.9999 * (tstmw2/tstmw1)
   endif
endif

numpas = 0 = number of tests passed so far
thismw = tstmw1

loop thru various marker sizes
next_mw:
OPQA/VARIOUS MARKER SIZE SCALE FACTORS: invoke SHPMBW subroutine to
  test bundle with requested marker size = thismw
                   expected marker size = thismw
if abort indicated
   if (numpas < 2) then
      message about marker size too big for the screen
      goto min_max_coerce
   else
      goto do_test_msg
   endif
elseif failure indicated
   numpas = 0
   goto do_test_msg
endif

numpas = numpas+1
set up for next marker size to be tested:
thismw = thismw * mult
if thismw <= tstmw2 goto next_mw

do_test_msg:
TEST: #SR 3 4 5 6 42 43 44
      "Available marker size scale factors should control the
       realized size of a polymarker."
pass/fail depending on (numpas > 0)

min_max_coerce:

TEST: #SR 3 4 5 6 42 43 45
      "A requested positive marker size scale factor below the
       minimum available should be realized as the minimum."
OPQA/POSITIVE MARKER SIZE BELOW MINIMUM: invoke subroutine SHPMBW
  to test bundle with requested marker size = minmw/2
                       expected marker size = minmw
pass/fail depending on return code from SHPMBW

TEST: #SR 3 4 5 6 42 43 45
      "A requested negative marker size scale factor should be
       realized as the minimum."
OPQA/NEGATIVE MARKER SIZE: invoke subroutine SHPMBW to test
  bundle with requested marker size = -maxmw-100
               expected marker size =  minmw
pass/fail depending on return code from SHPMBW

OPQA/POSITIVE MARKER SIZE ABOVE MAXIMUM: invoke subroutine SHPMBW
  to test bundle with requested marker size = maxmw*2
                       expected marker size = maxmw
if abort indicated
   message about marker size too big for the screen
else
   TEST: #SR 3 4 5 6 42 43 45
         "A requested marker size scale factor above the maximum
          available should be realized as the maximum."
   pass/fail depending on return code from SHPMBW
endif

*** *** *** marker type 1

nummar = number of markers to be drawn = random integer from 3 to 7
lmssf = list of marker sizes, contains:
   minmw/2, maxmw*2, -2.76, (minmw+maxmw)/2, minmw, maxmw, nommw

for ix = 1, nummar
   <set polymarker representation>:
      index        = ix
      marker type  = 1 (dot)
      marker size  = lmssf(ix)
      marker color = 1
next ix

draw reference marker (dot) and vertical line separator

draw bundles 1 thru nummar

TEST: #SR 3 4 5 6 42 43 46
      "Marker type 1 should be rendered as the smallest
       displayable dot, regardless of the marker size scale
       factor value."

OPQA/MARKER SIZE OF MARKER TYPE 1: How many dots to the right of
  the vertical line are the same size as the dot to the left of the
  line?
pass/fail depending on (number of dots = nummar)

*** *** *** polymarker color index

TEST: #SR 3 4 5 6 47 48 49
      "A defined polymarker color index should cause the
       addressed entry in the color table to be used when
       rendering a polymarker."

bckcol = background color = realized color spec for entry #0
forcol = foreground color = realized color spec for entry #1

szcolt = maximum size of color table (including entry #0)
numdis = number of markers to be drawn = min(8, szcolt, szbt)
mkcol  = random permutation of #0,#1, and nummar-2 random choices
         from entries #2 to #szcolt-1
visdx = from mkcol, randomly select an entry to be made visible
        but not the one that contains 0, since this may not be
        re-settable.

for ix = 1 to numdis
   set entry mkcol(ix) to bckcol
   <set polymarker representation>:
      index        = ix
      marker type  = 3
      marker size  = mscf
      color index  = mkcol(ix)
next ix

set entry mkcol(visdx) in color table to forcol
Display bundles 1 thru numdis and label them

OPQA/DEFINED POLYMARKER COLOR INDICES: Which marker is visible?
pass/fail depending on (response = marker colored by visdx)

end_def_col:

TEST: #SR 3 4 5 6 47 48 50
      "An undefined polymarker color index should cause entry
       number 1 in the color table to be used when rendering
       a polymarker."

set entry #1 in color table opposite from BCKCOL
set entry #1 different from FORCOL - make sure undefined default
  to *current* color-rep of #1, not just a predefined color.

expmct = number of explicit markers of color #1 = random integer
   from 0 to min(4, szbt-3)
u1,u2,u3 = 3 undefined, positive color indices - all greater
  than maximum defined entry in color table

draw star with color #1

set up bundles 1 thru 3 to marker type=1, size=mscf, color index= undf(1,2,3)
set up bundles 4 thru (expmct+3) to marker type=1, size=mscf, color index=1

display in random order bundles #1 thru expmct+3

OPQA/UNDEFINED POLYMARKER COLOR INDICES: How many markers are the
  same color as the star?
pass/fail depending on response = 3+expmct

END PROGRAM 11