Design: 04.02.04.02/P02
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 2: Text bundle index
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
DEFINED TEXT INDICES: All annotation text relative primitives but one
are identical (drawn with the same attributes). Identify the annotation
text relative primitive that is different.
UNDEFINED TEXT INDICES: A reference annotation text relative primitive
is drawn above a line with several other annotation text relative
primitives beneath it. Normally, all of these will have the same
attributes as the reference annotation text relative primitive.
Count up and report the number of the text primitives below the line
which match the reference text primitive in font, precision, expansion,
spacing, and color.
DESIGN:
set all ASFs to BUNDLED
<inquire workstation state table lengths> to determine
szbt = maximum size of text bundle table
*** *** *** text index *** *** ***
TEST: #SR 1 2 3 4
"A defined text index should cause the addressed entry in
the bundle table to be used when rendering an annotation text
relative primitive."
bundis = number of bundles to be displayed = min(8, szbt)
set all text bundles in bundis to:
font = 1
precision = STROKE
expansion = 0.7
spacing = 0.1
color = 1
bundif = randomly selected bundle from bundis
set text bundle #bundif to:
font = 2
precision = STROKE
expansion = 1.1
spacing = 0.1
color = 1
Display and label the annotation text relative primitive for each
bundle in bundis
OPQA/DEFINED TEXT INDICES: which annotation text relative primitive
is different?
pass/fail depending on (annotation text relative primitive with
attributes from bundle #bundif selected)
TEST: #SR 1 2 3 5
"An undefined text index should cause bundle number 1 in
the text bundle table to be used when rendering an annotation
text relative primitive."
set text bundle #1 to:
font = 2
precision = STROKE
expansion = 0.8
spacing = 0.2
color = 2
u1,u2,u3 = 3 undefined, positive indices - all greater than
maximum defined index in bundle table (szbt)
explct = number of explicit annotation text relative primitives
using bundle #1 = random integer from 0 to 4
draw reference annotation text relative primitive "Test text"
with bundle #1 near top of display
draw line underneath
display interleaved, below line:
three annotation text relative primitives "Test text" using
bundle index u1,u2,u3,
explct annotation text relative primitives
"Test text" using bundle index 1
OPQA/UNDEFINED TEXT INDICES: How many of the annotation text relative
primitives below the line have the same annotation text attributes
as the reference annotation text relative primitive above it?
pass/fail depending on (response = 3+explct)
END PROGRAM 2