Design: 04.03.04.02/P03
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 3: Appearance of highlighted primitives
CHARACTERISTICS: ynny
OPERATOR SCRIPT:
HIGHLIGHTING FILTER: Several numbered pairs of primitives are
displayed. For each prompt, enter a list of integers indicating
the pairs for which the left member of the pair is highlighted.
Use the right member as the non-highlighted one for comparison.
PRECEDENCE OF INVISIBILITY OVER HIGHLIGHTING: Several different
numbered primitives are displayed. As prompted, enter a list of
integers indicating which of them are invisible and which are
highlighted.
DESIGN:
If workstation allows, set up its color table with entries:
color index RGB color
----------- --- -----
0 0,0,0 black
1 0,1,0 green
2 1,1,0 yellow
3 1,1,1 white
4 0,0,1 blue
rationale: make sure highlighting works, even with bright colors
Set up structure of primitive pairs to be displayed, numbered 1-8
down the screen:
Nameset of all right members is null set
number primitive color nameset of left member
------ --------- ----- ----------------------
1 polyline 1 0, 1, 2
2 polymarker 2 3, 4, 5
3 fill area 3 6, 7, 8
4 cell array 4 9,10,11
5 text 1 12,13,14
6 polyline 3 2 15,16,17
7 annotation text 3 18,19,20
8 fill area set 4 21,22,23
Throughtout:
incl = inclusion set
excl = exclusion set
TEST: #SR 1 4 10 11
"Highlighting of primitives should be correctly controlled
by the highlighting filter when its inclusion set is the
largest guaranteed by the standard."
incl = {0-63}
excl = random set of 6 elements chosen from 0-23
set highlighting filter using incl, excl
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
TEST: #SR 1 4
"Highlighting of primitives should be correctly controlled
by the highlighting filter when its inclusion set is null."
set highlighting filter:
incl = null, excl = {2,4,6,8}
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
<inquire PHIGS facilities> to determine:
nanams = number of available names for namesets
if (nanams too large for array size of program) then
message to that effect
goto end_maximpl
endif
TEST: #SR 1 4 12
"Highlighting of primitives should be correctly controlled
by the highlighting filter when its inclusion set is the
largest supported by the implementation."
incl = {0-nanams}
excl = random set of 6 elements chosen from 0-23
set highlighting filter using incl, excl
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
end_maximpl:
TEST: #SR 1 4 12 13
"Highlighting of primitives should be correctly controlled
by the highlighting filter by ignoring invalid names in its
inclusion set."
incl = random set of 6 elements chosen from 0-23 plus -1, nanams
excl = null
set highlighting filter using incl, excl
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
TEST: #SR 1 4 10 11
"Highlighting of primitives should be correctly controlled
by the highlighting filter when its exclusion set is the
largest guaranteed by the standard."
incl = random set of 6 elements chosen from 0-23
excl = {0-63}
set highlighting filter using incl, excl
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
TEST: #SR 1 4
"Highlighting of primitives should be correctly controlled
by the highlighting filter when its exclusion set is null."
incl = random set of 6 elements chosen from 0-23
excl = null
set highlighting filter using incl, excl
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
TEST: #SR 1 4
"Highlighting of primitives should be correctly controlled
by the highlighting filter when its inclusion and
exclusion set are neither null nor full."
incl = random set of 7 elements chosen from 0-23
excl = random set of 5 elements chosen from 0-23
set highlighting filter using incl, excl
compute expected subset of highlighted primitives
from incl,excl
OPQA/HIGHLIGHTING FILTER: For which pairs of primitives is the
left member highlighted (n if none)?
pass/fail depending on (response = expected subset)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
ranord = random order for 1-8
for ix = 1 to 4
primid = ranord(ix)
make primitive #primid eligible for highlighting
next ix
for ix = 3 to 6
primid = ranord(ix)
make primitive #primid eligible for invisibility
next ix
TEST: #SR 1 4 5 8
"Primitives eligible only for highlighting should be highlighted
even when displayed along with invisible primitives."
OPQA/PRECEDENCE OF INVISIBILITY OVER HIGHLIGHTING: For which pairs of
primitives is the left member highlighted (n if none)?
pass/fail depending on (operator response matches ranord(1:2))
TEST: #SR 1 4 5 8
"Primitives eligible for both highlighting and invisibility
should be invisible."
OPQA/PRECEDENCE OF INVISIBILITY OVER HIGHLIGHTING: For which pairs of
primitives is the left member invisible (n if none)?
pass/fail depending on (operator response matches ranord(3:6))
END PROGRAM 3