Design: 04.03.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: Selective control of primitive aspects

CHARACTERISTICS: ynny

OPERATOR SCRIPT:
In all the test cases, several primitives are shown, and the
operator must indicate the one that is different. Note that ALL
the other primitives must be EXACTLY alike.

ASF CONTROL OF POLYLINE: The screen should show several lines,
all but one of which have the same aspects (linetype, linewidth,
color).  Identify the one line with some distinct aspect(s).

ASF CONTROL OF POLYMARKER: The screen should show several
polymarkers (each line contains one polymarker), all but one of
which have the same aspects (markertype, markersize, color).
Identify the one polymarker with some distinct aspect(s).

ASF CONTROL OF TEXT: The screen should show several text lines,
all but one of which have the same aspects (text font, text
precision, character expansion factor, character spacing, color).
Identify the one text line with some distinct aspect(s).

ASF CONTROL OF INTERIOR STYLE: The screen should show several
fill areas, all but one of which have the same interior style
(only HOLLOW and EMPTY are used).  Identify the one fill area
with a distinct style.  Note that an "invisible" fill area is
valid, since interior style = EMPTY is used.

ASF CONTROL OF INTERIOR STYLE INDEX:  The screen should show
several fill areas, all but one of which have the same interior
style and style index.  This test is run only if HATCH or PATTERN
is supported.  Identify the one fill area with a distinct
interior style index, i.e. a different hatch style or pattern.

ASF CONTROL OF INTERIOR COLOR:  The screen should show several
fill areas, all but one of which have the same interior color.
Identify the one fill area with a distinct color.

ASF CONTROL OF EDGE FLAG: The screen should show several fill
areas, all but one of which have the same edge flag.  Identify
the one fill area with a distinct edge flag.  Note that an
"invisible" fill area is valid, since edge flag = OFF is used.

ASF CONTROL OF EDGE ASPECTS: The screen should show several fill
areas, all but one of which have the same visible edge aspects
(edgetype, edgewidth scale factor, color).  Identify the one fill
area with some distinct aspect(s).

DESIGN:

try to set color table with #1,2,3 distinct

*** *** *** ***   polyline   *** *** *** ***

TEST: #SR 1 4 5 6 7 8 9
      "The program should be able to specify each of the
       non-geometric aspects of polyline primitives using either
       individual or bundled control."

aspects to be displayed:
linetype = 2, linewidth = 0.05 in WC, linecolor = 2

aspects to be suppressed:
linetype = 1, linewidth = 0.0001 in WC, linecolor = 1

set individual color indices for other primitives to 3, to make
  sure they don't interact with polyline.

numlin = number of lines to be displayed = 6
ngprim = line to be drawn incorrectly = random from 1 to 6
for ix = 1 to numlin
   typsrc = linetype source  = INDIVIDUAL or BUNDLED (random)
   widsrc = linewidth source = INDIVIDUAL or BUNDLED (random)
   colsrc = linecolor source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set polyline index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with typsrc,widsrc,colsrc
   if (ix = ngprim) then
      set ASF flag NOT in accordance with typsrc,widsrc,colsrc
   endif
   if (ix <= numlin/2) then
      draw <polyline> #ix
   else
      draw <polyline 3> #ix
   endif
next ix

OPQA/ASF CONTROL OF POLYLINE: Which line is different?
pass/fail depending on (operator selects line #ngprim)

*** *** *** ***   polymarker   *** *** *** ***

TEST: #SR 1 4 5 6 7 8 9
      "The program should be able to specify each of the
       non-geometric aspects of polymarker primitives using
       either individual or bundled control."

aspects to be displayed:
markertype = 4, markerwidth = 0.05 in WC, markercolor = 2

aspects to be suppressed:
markertype = 5, markerwidth = 0.03 in WC, markercolor = 1

set individual color indices for other primitives to 3, to make
  sure they don't interact with polymarker.

numlin = number of markers to be displayed = 6
ngprim = marker to be drawn incorrectly = random from 1 to 6
for ix = 1 to numlin
   typsrc = markertype source  = INDIVIDUAL or BUNDLED (random)
   widsrc = markerwidth source = INDIVIDUAL or BUNDLED (random)
   colsrc = markercolor source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set polymarker index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with typsrc,widsrc,colsrc
   if (ix = ngprim) then
      set ASF flag NOT in accordance with typsrc,widsrc,colsrc
   endif
   if (ix <= numlin/2) then
      draw <polymarker> #ix
   else
      draw <polymarker 3> #ix
   endif
next ix

OPQA/ASF CONTROL OF POLYMARKER: Which marker is different?
pass/fail depending on (operator selects marker #ngprim)

*** *** *** ***   text   *** *** *** ***

TEST: #SR 1 4 5 6 7 8 9
      "The program should be able to specify each of the
       non-geometric aspects of text and annotation text
       primitives using either individual or bundled control."

aspects to be displayed:
font = 2, precision = STROKE, expansion = 0.5, spacing = 0.3,
textcolor = 2

aspects to be suppressed:
font = 1, precision = STRING, expansion = 1.2, spacing = -0.3,
textcolor = 1

set individual color indices for other primitives to 3, to make
  sure they don't interact with text.

numlin = number of text lines to be displayed = 6
ngprim = text to be drawn incorrectly = random from 1 to 6
iprim = 1
for ix = 1 to numlin
   fntsrc = text font source      = INDIVIDUAL or BUNDLED (random)
   prcsrc = text precision source = INDIVIDUAL or BUNDLED (random)
   expsrc = text expansion source = INDIVIDUAL or BUNDLED (random)
   spcsrc = text spacing source   = INDIVIDUAL or BUNDLED (random)
   colsrc = text color source     = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set text index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with
     fntsrc, prcsrc, expsrc, spcsrc, colsrc

   if (ix = ngprim) then
      set ASF flag NOT in accordance with
        fntsrc, prcsrc, expsrc, spcsrc, colsrc
      next = iprim
   else
      next = iprim + 1
   endif
   iprim ensures that each primitive is drawn correctly at least once

   if (iprim = 1) then
      draw <text> #ix
   elseif (iprim = 2) then
      draw <text 3> #ix
   elseif (iprim = 3) then
      draw <annotation text> #ix
   elseif (iprim = 4) then
      draw <annotation text 3> #ix
   else
      draw <text> #ix
   endif
   iprim = next
next ix

OPQA/ASF CONTROL OF TEXT: Which text is different?
pass/fail depending on (operator selects text #ngprim)

*** *** *** ***   interior   *** *** *** ***

TEST: #SR 1 4 5 6 7 8 9
      "The program should be able to specify each of the
       non-geometric aspects in the interior bundle using either
       individual or bundled control."

set individual color indices for other primitives to 3, to make
  sure they don't interact with interior.

*** *** *** ***   interior style   *** *** *** ***

aspects to be displayed:
interior style = HOLLOW, interior style index = 1, interior-color = 2

aspects to be suppressed:
interior style = EMPTY, interior style index = 1, interior-color = 1

numlin = number of interior lines to be displayed = 6
ngprim = interior to be drawn incorrectly = random from 1 to 6
set edge flag = OFF
iprim = 1

for ix = 1 to numlin
   stysrc = interior style source = INDIVIDUAL or BUNDLED (random)
   iixsrc = interior style index source = INDIVIDUAL or BUNDLED (random)
   colsrc = interior color source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set interior index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with: stysrc, iixsrc, colsrc

   if (ix = ngprim) then
      set ASF flag NOT in accordance with stysrc, iixsrc, colsrc
      next = iprim
   else
      next = iprim+1
   endif
   iprim ensures that each primitive is drawn correctly at least once

   if (iprim = 1) then
      draw <fill area> #ix
   elseif (iprim = 2) then
      draw <fill area 3> #ix
   elseif (iprim = 3) then
      draw <fill area set> #ix
   elseif (iprim = 4) then
      draw <fill area set 3> #ix
   else
      draw <fill area> set #ix
   endif
   iprim = next
next ix

OPQA/ASF CONTROL OF INTERIOR STYLE: Which interior is different?
if (operator selects interior #ngprim) then
   OK so far
else
   fail
   goto end_int
endif

*** *** *** ***   interior style index   *** *** *** ***

if (HATCH available) then
   int-style = HATCH
   iix1, iix2 = two available hatch styles
elseif (PATTERN available) then
   int-style = PATTERN
   iix1, iix2 = 1,2 = define two distinct patterns
else
   goto end_int_index
endif

aspects to be displayed:
interior style = int-style, interior style index = iix1, interior-color = 2

aspects to be suppressed:
interior style = int-style, interior style index = iix2, interior-color = 1

numlin = number of interior lines to be displayed = 6
ngprim = interior to be drawn incorrectly = random from 1 to 6
set edge flag = OFF
iprim = 1

for ix = 1 to numlin
   stysrc = interior style source = INDIVIDUAL or BUNDLED (random)
   iixsrc = interior style index source = INDIVIDUAL or BUNDLED (random)
   colsrc = interior color source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set interior index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with: stysrc, iixsrc, colsrc

   if (ix = ngprim) then
      set ASF flag NOT in accordance with stysrc, iixsrc, colsrc
      next = iprim
   else
      next = iprim + 1
   endif
   iprim ensures that each primitive is drawn correctly at least once

   if (iprim = 1) then
      draw <fill area> #ix
   elseif (iprim = 2) then
      draw <fill area 3> #ix
   elseif (iprim = 3) then
      draw <fill area set> #ix
   elseif (iprim = 4) then
      draw <fill area set 3> #ix
   else
      draw <fill area> set #ix
   endif
   iprim = next
next ix

OPQA/ASF CONTROL OF INTERIOR STYLE INDEX: Which interior is different?
if (operator selects interior #ngprim) then
   OK so far
else
   fail
   goto end_int
endif

end_int_index:

*** *** *** ***   interior color   *** *** *** ***

if (number of distinct colors < 2) then
   pass
   goto end_int
endif

if (SOLID available) then
   int-style = SOLID
else
   int-style = HOLLOW
endif

aspects to be displayed:
interior style = int-style, interior style index = 1, interior-color = 2

aspects to be suppressed:
interior style = int-style, interior style index = 1, interior-color = 1

numlin = number of interior lines to be displayed = 6
ngprim = interior to be drawn incorrectly = random from 1 to 6
set edge flag = OFF
iprim = 1

for ix = 1 to numlin
   stysrc = interior style source = INDIVIDUAL or BUNDLED (random)
   iixsrc = interior style index source = INDIVIDUAL or BUNDLED (random)
   colsrc = interior color source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set interior index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with: stysrc, iixsrc, colsrc

   if (ix = ngprim) then
      set ASF flag NOT in accordance with stysrc, iixsrc, colsrc
      next = iprim
   else
      next = iprim + 1
   endif
   iprim ensures that each primitive is drawn correctly at least once

   if (iprim = 1) then
      draw <fill area> #ix
   elseif (iprim = 2) then
      draw <fill area 3> #ix
   elseif (iprim = 3) then
      draw <fill area set> #ix
   elseif (iprim = 4) then
      draw <fill area set 3> #ix
   else
      draw <fill area> set #ix
   endif
   iprim = next
next ix

OPQA/ASF CONTROL OF INTERIOR COLOR: Which interior color is different?
pass/fail depending on (operator selects interior #ngprim)

end_int:

*** *** *** ***   edge   *** *** *** ***

TEST: #SR 1 4 5 6 7 8 9
      "The program should be able to specify each of the
       non-geometric aspects in the edge bundle using either
       individual or bundled control."

set individual color indices for other primitives to 3, to make
  sure they don't interact with edge color.

*** *** *** ***   edge flag   *** *** *** ***

ed1,ed2 = two available edge types

aspects to be displayed:
edge flag = ON, edgetype = ed2, edgewidth = 0.02 in WC, edgecolor = 2

aspects to be suppressed:
edge flag = OFF, edgetype = ed1, edgewidth = 0.001 in WC, edgecolor = 1

set interior style = EMPTY

numlin = number of edge lines to be displayed = 6
ngprim = edge to be drawn incorrectly = random from 1 to 6

for ix = 1 to numlin
   flgsrc = edge flag source = INDIVIDUAL or BUNDLED (random)
   typsrc = edgetype source  = INDIVIDUAL or BUNDLED (random)
   widsrc = edgewidth source = INDIVIDUAL or BUNDLED (random)
   colsrc = edgecolor source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set edge index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with: flgsrc,typsrc,widsrc,colsrc

   if (ix = ngprim) then
      set ASF flag NOT in accordance with flgsrc,typsrc,widsrc,colsrc
   endif

   if (ix <= numlin/2) then
      draw <fill area set> #ix
   else
      draw <fill area set 3> #ix
   endif
next ix

OPQA/ASF CONTROL OF EDGE FLAG: Which edge is different?
if (operator selects edge #ngprim) then
   OK so far
else
   fail
   goto end_edge:
endif

*** *** *** ***   edge type,width,color   *** *** *** ***

if (only one edge type,width,color available) then
   pass
   goto end_edge
endif
ed1,ed2 = two available edge types

aspects to be displayed:
edge flag = ON, edgetype = ed2, edgewidth = 0.02 in WC, edgecolor = 2

aspects to be suppressed:
edge flag = ON, edgetype = ed1, edgewidth = 0.001 in WC, edgecolor = 1

set interior style = EMPTY

numlin = number of edge lines to be displayed = 6
ngprim = edge to be drawn incorrectly = random from 1 to 6

for ix = 1 to numlin
   flgsrc = edge flag source = INDIVIDUAL or BUNDLED (random)
   typsrc = edgetype source  = INDIVIDUAL or BUNDLED (random)
   widsrc = edgewidth source = INDIVIDUAL or BUNDLED (random)
   colsrc = edgecolor source = INDIVIDUAL or BUNDLED (random)

   set bundle #ix to displayed aspects, for BUNDLED source
                and suppressed aspects, for INDIVIDUAL source
   set edge index to ix
   set individual attributes
                  to displayed aspects, for INDIVIDUAL source
                and suppressed aspects, for BUNDLED source

   set ASF flags in accordance with: flgsrc,typsrc,widsrc,colsrc

   if (ix = ngprim) then
      set ASF flag NOT in accordance with flgsrc,typsrc,widsrc,colsrc
   endif

   if (ix <= numlin/2) then
      draw <fill area set> #ix
   else
      draw <fill area set 3> #ix
   endif
next ix

OPQA/ASF CONTROL OF EDGE ASPECTS: Which edge is different?
pass/fail depending on (operator selects edge #ngprim)

end_edge:

END PROGRAM 2