Design: 04.02.05.01/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: Appearance of individual interior attributes

CHARACTERISTICS: ynny

OPERATOR SCRIPT:

INTERIOR STYLES: This screen should display examples of each of
the mandatory and optional interior styles actually supported by
the implementation.  You should not consider whether all 5 are
present, but simply whether each interior style is recognizable
from the verbal description.  Enter a list of integers which
identify the interior styles in the same order as they appear in
the prompt.

UNSUPPORTED INTERIOR STYLES: This screen should display several
hollow fill areas and one non-hollow fill area. Identify the
non-hollow area.

INTERIOR STYLE - HOLLOW: This screen should display several
hollow fill areas.  All but one fill area should have linetype
and linewidth as documented by the implementor.  Identify the
fill area with the different linetype and linewidth.

REGISTERED HATCH STYLES: This screen displays a sample of
supported registered hatch styles (at most 8).  For each
displayed fill area/area sets, look up its hatch style identifier
in the ISO register and verify that the actual appearance of the
hatch style agrees with the specification.

IMPLEMENTOR DEFINED HATCH STYLES: This screen displays a sample
of implementor defined hatch styles (at most 8).  For each
displayed fill area/area set, look up its hatch style identifier
in the implementor's documentation and verify that the actual
appearance of the hatch style agrees with the specification.

COMPLETE DOCUMENTATION FOR IMPLEMENTOR HATCH STYLES: No
associated picture.  Verify that all the entries  in the list of
available hatch styles for this workstation type are documented
by the implementor.  The list may be a subset of the documented
hatch styles.

UNSUPPORTED HATCH STYLES: This screen should display several fill
areas/area sets with a hatch style that corresponds to interior
style index 1; and one fill area/area set with a different hatch
style. Identify the area with the different hatch style.

DEFINED PATTERN INDICES: All fill areas/area sets but one are
drawn with the same pattern. Identify the single area drawn in
the a different pattern style. NOTE: this tests the indices into
the pattern table (similar to color).

UNDEFINED PATTERNS: This screen should display several fill
areas/area sets with a pattern that corresponds to interior style
index 1; and one fill area/area set with a different pattern.
Identify the area with the different pattern.

DEFINED INTERIOR COLOR INDICES: All fill areas/areas sets
but one are drawn in the background color.  Identify the fill
area/area set drawn in the default foreground color.

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


DESIGN:

use <inquire interior facilities> to determine:
  lavis  = list of available interior styles
  nalis  = number of available & legal interior styles (HOLLOW:EMPTY)
  numhs  = number of available hatch styles
  lavrhs = list of available registered (non-mandatory) hatch styles
  lavihs = list of available implementor-defined hatch styles
           (may be derived directly from hatch style value, if reported
            number of hatch styles < 0)
  noaval = list of interior styles not available

*** *** ***   1. interior style   *** *** ***

Use default background color=0, foreground=1
Use default interior style index = 1

Display in random order FILL AREA with all available and legal
   (hollow:empty) interior styles in lavis

TEST: #SR 3 5 6 7 8 10 12 13 14 15
      "The interior styles, including mandatory styles (HOLLOW,
       EMPTY), should be recognizable from their standard
       description."

OPQA/INTERIOR STYLES: List, in order, the numeric labels for interior
  styles: HOLLOW, SOLID, PATTERN, HATCH, EMPTY.

pass/fail depending on (all displayed interior styles correctly identified)

if (all 5 interior styles available) then
   goto end_nosup
endif

lunsup = list of (mostly) unsupported interior styles contains:
   HOLLOW
   3 unsupported interiors from noaval
   non-HOLLOW supported interior

Display in random order FILL AREA with interior styles from lunsup

TEST: #SR 3 5 6 7 9 10
      "Unavailable interior styles should be displayed as
       HOLLOW."

OPQA/UNSUPPORTED INTERIOR STYLES: which rectangle is NOT hollow?
pass/fail depending on (the non-hollow filled area selected)

end_nosup:

TEST: #SR 3 5 6 7 8 10 11
      "For HOLLOW interior style, the linetype and linewidth of
       the bounding polyline should be as specified by the
       implementor."

OPQA/Does implementor document the linetype and linewidth?
If (no) then
   fail
   goto end_hollow
endif

OPQA/Enter the linetype used for a HOLLOW interior style.
opltyp = operator response
OPQA/Enter the linewidth used for a HOLLOW interior style.
oplwid = operator response

set linetype to opltyp
set line width to oplwid

draw 5 fill areas: 2 actual, 3 simulated, with one of the
simulated ones drawn incorrectly

OPQA/INTERIOR STYLE - HOLLOW: Which rectangle is different?
pass/fail depending on (response = different rectangle)

end_hollow:

*** *** *** interior style index - hatch   *** *** ***

if (HATCH not available) then
   message: hatch style not supported, skip tests
   goto end_hatch
endif

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

if regdx < 9
   hatdis = hatch styles to be displayed = all hatch styles in lavrhs
else
   hatdis = hatch styles to be displayed = 8 hatch styles randomly selected
                                           from lavrhs
endif

display in order and label all FILL AREA hatch styles in hatdis

TEST: #SR 3 5 7 8 14 18 19 20 22
      "The registered hatch styles (> 0) should agree with their
       registered descriptions."

OPQA/REGISTERED HATCH STYLES: Is each hatch style depicted
  according to its numeric identifier's specification in
  the ISO register?
pass/fail depending on (operator responds "yes")

neg_type:

impdx = size of lavihs
if impdx < 1 goto end_hatch_style

if impdx< 9
   hatdis = hatch styles to be displayed = all hatch styles in lavihs
else
   hatdis = hatch styles to be displayed = 8 hatch styles randomly
                                           selected from lavihs
endif

display in order and label all FILL AREA SET hatch styles in hatdis

TEST: #SR 4 5 7 8 14 18 19 20 23
      "Implementor-defined hatch styles (< 1) should agree with
       the descriptions supplied by the implementor."

OPQA/IMPLEMENTOR DEFINED HATCH STYLES: Is each hatch style
  depicted according to its numeric identifier's specification in
  the implementor documentation.
pass/fail depending on (operator responds "yes")

if (impdx <= 8 or numhs < 0) then
   either all implementor hatch styles already shown or
   hatch styles appearance derived directly from value - skip test
   goto end_hatch_style
endif

TEST: #SR 23
      "All reported implementor-defined hatch styles available
       for a given workstation type should be documented by the
       implementor."

OPQA/COMPLETE DOCUMENTATION FOR IMPLEMENTOR HATCH STYLES: Are all
  these reportedly available hatch styles documented by the implementor
  <lavihs>?
pass/fail depending on (operator responds "yes")

end_hatch_style:

if (hatch index 1 not available) then
   message: No index #1, skip test of unsupported hatch style
   goto end_hatch
endif
lunsup = list of (mostly) unsupported hatch styles contains:
   a negative unsupported type, if available (< minimum in lavihs)
   0, if not in lavihs
   a positive unsupported type (> maximum in lavrhs)
   1, (horizontal hatch)
   a supported type, other than 1 (should be at least 2 others)

Display in random order FILL AREA  with interior styles from lunsup

TEST: #SR 3 5 7 8 14 18 19 21
      "Unavailable hatch styles should be displayed as hatch
       style #1."

OPQA/UNSUPPORTED HATCH STYLES: which hatch style is not the
  horizontal hatch style of index #1?
pass/fail depending on (the non-hatch style 1 selected)

end_hatch:

*** *** ***  interior style index - pattern   *** *** ***

if (PATTERN not available) then
   message: skip tests, pattern not available
   goto end_pattern
endif

TEST: #SR 3 4 5 7 8 15 18 19 20
      "A defined pattern index should cause the addressed entry
       in the pattern table to be used when rendering a polygonal
       area filled with pattern interior style."

Set 5 patterns (use index 1-5): 4 identical and one different
Display in random order FILL AREA SET with all 5 patterns

OPQA/DEFINED PATTERN INDICES: which pattern is different?
pass/fail depending on (response = different pattern selected )

lunsup = list of (mostly) unsupported pattern indices contains:
   3 undefined pattern indices
   1, (reset to checkerboard)
   a supported type, other than 1 (set one)

Display in random order FILL AREA with interior styles from lunsup

TEST: #SR 3 4 5 6 7 8 15 18 19 21
      "Unavailable patterns should be displayed as pattern #1."

OPQA/UNDEFINED PATTERNS: which pattern is different?
pass/fail depending on (response = different pattern selected)

end_pattern:

*** *** *** interior color index   *** *** ***

TEST: #SR 3 4 10 13 14 26 27 28
      "A defined interior color index should cause the addressed
       entry in the color table to be used when rendering the
       interior of a fill area or fill area set."

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)
numfil = number of fill areas to be drawn = min(8, szcolt)
facol  = random permutation of #0,#1, and numfil-2 random choices
         from entries #2 to #szcolt-1
visdx = from facol, 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 numfil
   set entry lncol(ix) to bckcol
   set interior style to rotate through [HATCH,SOLID,HOLLOW]
     (if unavailable, will default to HOLLOW)
   draw fill area or fill area set #ix with interior colour index
     = facol(ix), and label it
next ix

set entry facol(visdx) to forcol

OPQA/DEFINED INTERIOR COLOR INDICES: which fill area is visible?
pass/fail depending on (response = fill area colored by visdx)

end_def_col:

TEST: #SR 3 4 10 13 14 26 27 29
      "An undefined interior color index should cause entry
       #1 in the color table to be used when rendering the
       interior of a fill area or fill area set."

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.

u1,u2,u3 = 3 undefined, positive color indices - all greater
  than maximum defined entry in color table
expfas = number of explicit fill area/area sets of color #1
       = random integer
   from 0 to 4

draw star with color #1

display interleaved:
  three fill areas of color u1,u2,u3,
  expfas fill areas of color #1
  set interior style to rotate through [HATCH,SOLID,HOLLOW]
     (if unavailable, will default to HOLLOW)

OPQA/UNDEFINED INTERIOR COLOR INDICES: how many rectangles
  are the same color as the star?
pass/fail depending on (response = 3+expfas)

END PROGRAM 2