Design: 04.02.04.01/P05

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 5: Network inheritance and initialization for
           non-geometric annotation text attributes

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

STRUCTURE NETWORK INHERITANCE FOR TEXT FONT AND PRECISION: This
screen displays several left-right pairs of annotation text
relative primitives.  Make sure that all pairs except one have
matching text fonts and precisions.  Identify the non-matching
pair.

STRUCTURE NETWORK INHERITANCE FOR CHARACTER EXPANSION AND
SPACING: This screen displays several left-right pairs of
annotation text relative primitives.  Make sure that all pairs
except one have matching character expansion and spacing
attributes.  Identify the non-matching pair.

STRUCTURE NETWORK INHERITANCE FOR TEXT COLOUR INDEX: This screen
displays several left-right pairs of annotation text relative
primitives.  Make sure that all pairs except one have matching
colors.  Identify the non-matching pair.

DESIGN:

All test cases use same basic structure network for testing
inheritance.  Five (distinct if possible) values for the
attribute to be tested are set up and propagated throughout the
network.  The first value is the system default from the PDT.
Note that structure #104 is executed by both #103 and #101.
Actual results are displayed on the left, expected results
on the right, with the 14th deliberately made incorrect.

default = val#1
  |                  102
  |                 /  prim 2
  |               /    attr = val#3   val#3
  V        val#1/      exec 103---------------103
101           /        prim 8                   prim 3
  prim 1    /                                   attr = val#4
  exec 102/                                     prim 4
  prim 9                                        exec 104\
  attr = val#2                                  prim 7    \ val#4
  prim 10                                                   \
  transform             val#2                                 \
  exec 104-----------------------------------------------------104
  un-transform                                                   prim 5/11
  prim 13                                                        attr = val#5
  prim 14                                                        prim 6/12
  exec 105---------->105
                       expected values

*** *** *** ***   text font and precision   *** *** *** ***

ldisfn,ldispr = list of 5 distinct font,precision pairs
ldisfn(1),ldispr(1) = 1,STRING
ldisfn(2),ldispr(2) = 2,STROKE
ldisfn(3),ldispr(3) = 1,CHAR
ldisfn(4),ldispr(4) = 2,STRING

use <inquire text facilities> to find one other available font
if (another font found) then
   add it as 5th entry to ldisfn,ldispr
else
   add (1,STROKE) as 5th entry
endif

randomize location of annotation text primitives
set up CSS as described above
set all ASFs to INDIVIDUAL

display 14 pairs of annotation text primitives, using ldisfn and
  ldispr 1-5

TEST: #SR 5 6 14 16 17 19 20 24 25
      "The text font and precision attributes for the annotation
       text relative primitive should be saved and restored by
       <execute structure> during traversal."

OPQA/STRUCTURE NETWORK INHERITANCE FOR TEXT FONT AND PRECISION:
  which pair of annotation text primitives does NOT match?
pass/fail depending on response = position of annotation text #14

*** *** ***   character expansion and spacing   *** *** ***

ldisxp,ldissp = list of 5 distinct expansion and spacing values
ldisxp(1),ldissp(1) = 1.0,  0.0
ldisxp(2),ldissp(2) = 0.4,  1.4
ldisxp(3),ldissp(3) = 0.7,  1.1
ldisxp(4),ldissp(4) = 1.3,  0.5
ldisxp(5),ldissp(5) = 1.7, -0.3

randomize location of annotation text primitives
set up CSS as described above
set all ASFs to INDIVIDUAL

display 14 pairs of annotation text primitives, using ldisxp and
  ldissp 1-5

TEST: #SR 5 26 27 30 31 32 33 35 36
      "The character expansion factor and character spacing
       attributes for the annotation text relative primitive
       should be saved and restored by <execute structure> during
       traversal."

OPQA/STRUCTURE NETWORK INHERITANCE FOR CHARACTER EXPANSION AND
  SPACING: which pair of annotation text primitives does NOT match?
pass/fail depending on response = position of annotation text #14

*** *** *** ***   text colour index   *** *** *** ***

call DISCOL to try to get 5 distinct foreground colors,
  returning fcol = actual number of foreground colors

set up colind = list of distinguishable color indexes
if (fcol <= 1) then
   colind = selection from background and foreground colors
          = [1,0,1,1,0]
else
   colind = circular list of indices = [1,..,fcol, 1,..]
endif

randomize location of annotation text primitives
set up CSS as described above
set all ASFs to INDIVIDUAL

display 14 pairs of annotation text primitives, using colind 1-5

TEST: #SR 5 37 38 40 41
      "The annotation text color index attribute for the
       annotation text relative primitive should be saved and
       restored by <execute structure> during traversal."

OPQA/STRUCTURE NETWORK INHERITANCE FOR TEXT COLOUR INDEX:
  which pair of annotation text relative primitives does NOT match?
pass/fail depending on response = position of annotation text #14

END PROGRAM 5