XGL Test Suite User's Guide
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

Line Test Descriptions

16

This chapter describes the Line test programs. The following is defined for each test program:
  • Name of the test program
  • Test types (See the section, "Denizen Test Types" on page 2 for the different test types.)
  • Description of the test program
  • Attributes tested by the program
  • Operators tested by the program
  • Output from the test program
· gc_line0
Test Types:RGB, SM
Description:Tries a gcache line with 7 points in one point list, and another in two point lists with 7 points included in each list.
Attributes Tested: XGL_GCACHE
Operators Tested: xgl_object_create
xgl_object_destroy
xgl_gcache_multipolyline
xgl_context_display_gcache

Output:· gc_line_attrThe first gcached line has three local maxima and two local minima. The second gcached collection of point lists has the previously rendered line plus the same line drawn translated below the previously rendered line by 100.
Test Types:RGB, SM
Description:Checks that validation of attributes during gcache display is done as specified. Checks also that the attributes that are not validated do not persist.
Attributes Tested: XGL_3D_CTX_MODEL_CLIP_PLANE_NUM

Operators Tested: xgl_object_create
Output:· line0Two gcached collection of point lists with 7 points in each point list with each line rendered an exact copy of the previous line except the line has been translated below the previous line by 100; and each line containing three local maxima and two local minima.
Test Types:INDEX, SM
Description:Renders a line with a negative slope, for both win_ras and mem_ras from 20, 20 to 300, 300 utilizing point type XGL_PT_I2D, and a bounding box of NULL. The color map used is the default, so only two colors, black and white are available.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_MEM_RAS
                    XGL_RAS_DEPTH
                    XGL_RAS_WIDTH
                    XGL_RAS_HEIGHT
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             A negative sloped white line

· line1
Test Types:INDEX, SM
Description:Renders two white lines with negative slopes and one white line with a positive slope against win_ras and mem_ras utilizing point type XGL_PT_I2D. The color map used is the default, so only two colors, black and white are available.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_MEM_RAS
                    XGL_RAS_DEPTH
                    XGL_RAS_WIDTH
                    XGL_RAS_HEIGHT
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Three white lines with two lines having a negative slope

and one line having a positive slope. After the rendering of a single white line, the screen is cleared and another white line is drawn.
· line2
Test Types:INDEX, SM
Description:Renders six white lines against both win_ras and mem_ras with point type XGL_PT_I2D. The first three lines are solids and the last three are dashed pattern lines. The color map used is the default, so only two colors, black and white are available.
Attributes Tested: XGL_CTX_LINE_COLOR
XGL_CTX_LINE_PATTERN
XGL_CTX_LINE_STYLE

                    XGL_LINE_PATTERNED
                    XGL_MEM_RAS
                    XGL_RAS_DEPTH
                    XGL_RAS_WIDTH
                    XGL_RAS_HEIGHT
Operators Tested:   xgl_object_set
                    xgl_multipolyline
                    xgl_object_get
Output:             A line is rendered and then the screen is cleared. The first

three lines rendered are solid. The next three lines rendered are dashed.
· line3
Test Types:INDEX, SM
Description:Tries thin and fat shaded lines utilizing the line attribute XGL_3D_CTX_LINE_COLOR_INTERP. Loops through two settings for line width, 1.0 and 5.0, with seven variations for shading the individual segments for the line. The seven different arrangements for rendering color of the lines are:
  • Same color at each end
  • Different color at each end
  • Reversed colors
  • Same colors, first segment
  • Different colors, each segment
  • Multiple polylines
  • Single pixel
Attributes Tested: XGL_3D_CTX_LINE_COLOR_INTERP
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Lines with arrangements mentioned above appear like:
                    ·   Red negative sloped line
                    ·   Horizontal line red, lime green, yellow, dark blue,
                        purple light blue
                    ·   Horizontal line purple, dark blue, yellow, lime green,
                        red
                    ·   First segment--red; second segment--red, lime green,

yellow, dark blue, purple, light blue
  • First segment--red, lime green, yellow, dark blue; second segment--dark blue, purple, light blue, grey
  • Two horizontal lines--top: red, lime green, yellow, blue; bottom: dark blue, purple, light blue, grey
  • One purple pixel
· line4
Test Types:INDEX, SM
Description:Checks three cases for the correct management of HLHSR for the z value: (1) the first line is in front, (2) the second line is in front, and (3) both lines have the same z value. Tests loops through six variation of lines and they are:
  • Vertical
  • Horizontal
  • 45 degrees
  • Arbitrary slope
  • Multi-segmented
  • Multipolyline
Attributes Tested: XGL_3D_CTX_HLHSR_MODE

Operators Tested: xgl_object_set
Output:· line5Lines appear as described above with loop 1--all lines red; loop 2--all lines green; loop 3--all lines green
Test Types:RGB, SM
Description:Same test as line3 except this test is RGB
Attributes Tested: XGL_3D_CTX_LINE_COLOR_INTERP
                    XGL_CTX_BACKGROUND_COLOR
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
Operators Tested:   xgl_object_set
                    xgl_multipolyline

Output:· Red negative sloped line· line6Line variations as mentioned for line3 with the color scheme as follows:
Test Types:RGB, SM
Description:Same as line4 except this test is RGB
Attributes Tested: XGL_3D_CTX_HLHSR_MODE

Operators Tested: xgl_object_set
Output:· line7Lines appear as described in line4 with loop 1--all lines brown; loop 2--all lines green; loop 3--all lines green
Test Types:RGB, SM
Description:Renders three horizontal green dashed lines and three vertical green dashed lines
Attributes Tested: XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_PATTERN
                    XGL_LINE_SOLID
                    XGL_LINE_PATTERNED
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Three horizontal green dashed lines and three vertical
                    green dashed lines

· line8
Test Types:RGB, SM
Description:Renders light blue solid and dashed pattern horizontal lines
Attributes Tested: XGL_CTX_LINE_PATTERN
Operators Tested: xgl_object_set
Output:· line9A light blue solid horizontal line, dashed horizontal light blue line, solid light blue line, and finally a wide dashed horizontal light blue line
Test Types:RGB, SM
Description:Renders a collection of lines utilizing the same values for x1, y1, x2 but changing y2 through each loop by adding 10 to the previous y2 value. Renders a collection of 50 random horizontal lines with random colors and random widths. Renders a collection of 50 random vertical lines with random colors and random widths.
Attributes Tested: XGL_CTX_LINE_STYLE
Operators Tested: xgl_object_set
Output:· line10Renders a collection of RGB lines like the spokes of a wheel from a horizontal location to practically a 90-degree spoke. Renders a variety of different-colored wide horizontal lines and finally a variety of different-colored vertical horizontal lines.
Test Types:CM, RGB
Description:...Checks RGB line-pattern balancing. Uses random colors and variable lengths. Checks horizontal and vertical cases. Does token check of wide-patterned lines.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_PATTERN
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_LINE_PATTERNED
                    XGL_LINE_SOLID
                    XGL_LPAT
                    XGL_LPAT_BALANCED_DASH
                    XGL_LPAT_BALANCED_SEGMENT
                    XGL_LPAT_BAL_DASH_0
                    XGL_LPAT_BAL_DASH_1
                    XGL_LPAT_COORD_SYS
                    XGL_LPAT_DATA
                    XGL_LPAT_DATA_SIZE
                    XGL_LPAT_DC
                    XGL_LPAT_OFFSET
                    XGL_LPAT_STYLE
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Two frames of horizontal-patterned balanced lines, with

the length of each successive horizontal line increased by 12 followed by two frames of vertical-patterned balanced lines, with each successive vertical line height increased by 12. The correct balancing is indicated by the gaps in each line, which when correct, form a straight undisturbed margin of background color across all the lines rendered in the frame. The final frame is a single wide-patterned line.
· line11
Test Types:INDEX, SM
Description:Checks every pixel in a horizontal and simple alternate-patterned dotted line
Attributes Tested: XGL_CTX_LINE_ALT_COLOR
                    XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_PATTERN
                    XGL_CTX_LINE_STYLE
                    XGL_LINE_ALT_PATTERNED
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Horizontal alternate dotted line, with the even-colored
                    dots red and the gaps green

· line12
Test Types:INDEX, SM
Description:Sets the line color to 255. Loops through all of the possible plane mask values, 0-255. Clears the plane mask by setting it to -1. Sets the plane mask to the loop value. Checks for line color for the plane mask value of 255.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_CTX_PLANE_MASK
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Two hundred fifty five frames of a horizontal line in the
                    line color for the loop value of 255

· line13
Test Types:INDEX, CM
Description:Renders a trapezoid in a variety of patterned lines and checks to see that the pattern follows through properly in acute and obtuse angles. Renders a parallelogram in a variety of wide widths and checks to see that the mitered joins are properly rendered.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_PATTERN
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_LINE_PATTERNED
                    XGL_LINE_SOLID
Operators Tested:   xgl_object_set
                    xgl_multipolyline

Output:· line14Six trapezoids, each located inside the previous one in a variety of colors and patterns. Five parallelograms in a variety of widths and colors, each located inside the previous one.
Test Types:INDEX, CM
Description:Renders a trapezoid in a variety of wide patterned lines and checks to see that both the pattern, the joins, and the width follow through the acute and obtuse angles properly.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_PATTERN
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_LINE_PATTERNED
                    XGL_LINE_SOLID
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Five trapezoids, each located inside the previous one in a
                    variety of colors, patterns, and widths

· line15
Test Types:INDEX, CM
Description:Renders three spice jars with 3d_flag point type by alternating the settings of edge flags on and off, varying the color, and changing the cap styles through all possibilities.
Attributes Tested: XGL_CAP_BUTT
Operators Tested: xgl_object_set
                    xgl_multipolyline
Output:             Three spice jars outline each located within each other.

The outer line color is white, the middle is red, and the inner is green. The butt styles are square, round, and butt. The on/off segments are segment, off, two segments, off, two segments, off, and last segment on. A marker indicates the commencement of the butt style.
· line16
Test Types:INDEX, CM
Description:Renders six spice jars with 3d_flag point type by alternating the settings of edge flags on and off, varying the color, varying the line pattern, and changing the cap styles through all possibilities.
Attributes Tested: XGL_CAP_BUTT

Operators Tested: xgl_object_set
Output:.....Six spice jars outline each located within each other. The line colors starting from the outward to innermost are white, red, lime green, dark blue, yellow, and light blue. The butt styles are square, round, and butt. The on/off segments are segment, off, two segments, off, two segments, off, and last segment on. The line pattern types from the outward are dotted, dashed, dashed-dotted, dash-dot, dash-dot-dotted, and long dashed.
· line17
Test Types:INDEX, CM
Description:Renders wide single-segment lines such that they form a spoke around an imaginary center, and checks their variety of cap styles by rendering a marker at the beginning of the cap
Attributes Tested: XGL_CAP_BUTT
                    XGL_CAP_ROUND
                    XGL_CAP_SQUARE
                    XGL_CTX_LINE_CAP
                    XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
Operators Tested:   xgl_object_set
                    xgl_multipolyline
                    xgl_object_get
Output:             Fourteen wide single-segment lines. Starting with the

approximately 45-degree sloped, the white line in the upper-left corner of the raster is white, red, lime green, dark blue, yellow, light blue, purple, white, red, lime green, dark blue, yellow, light blue, and purple. Also starting with this white line, the cap styles are square, round, and butt and then repeat through the lines rendered.
· line18
Test Types:INDEX, CM
Description:Renders wide single-segment patterned lines so that they form a spoke around an imaginary center, and checks their variety of cap styles by rendering a marker at the beginning of the cap
Attributes Tested: XGL_CAP_BUTT
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_LINE_PATTERNED
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             Fourteen wide single-segment lines. Starting with the

approximately 45-degree sloped, the white line in the upper-left corner of the raster is white, red, lime green, dark blue, yellow, light blue, purple, white, red, lime green, dark blue, yellow, light blue, and purple. Also starting with this white line, the cap styles are square and round and then repeat through the lines rendered. The pattern types repeated through this arrangement are dotted, dashed, dashed-dotted, dash-dot, dash-dot-dotted, and long dashed.
· line19
Test Types:INDEX, CM
Description:Renders three spice jars with 2d_flag point type alternating the settings of edge flags on and off, varying the color and the width, and changing the cap styles through all possibilities against both win_ras and mem_ras
Attributes Tested: XGL_CAP_BUTT
                    XGL_CAP_ROUND
                    XGL_CAP_SQUARE
                    XGL_CLR_EDGE_FLAG
                    XGL_CTX_LINE_CAP
                    XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_LINE_SOLID
                    XGL_SET_EDGE_FLAG
                    XGL_MEM_RAS
                    XGL_RAS_DEPTH
                    XGL_RAS_WIDTH
                    XGL_RAS_HEIGHT
Operators Tested:   xgl_object_set
                    xgl_multipolyline

Output:· line20Three spice jars outline each located within each other. The outer line color is white, the middle is red, and the inner is green. The butt styles are square, round, and butt. The on/off segments are segment, off, two segments, off, two segments, off, and last segment on. A marker indicates the commencement of the butt style.
Test Types:INDEX, CM
Description:Renders two outlines of geckos: one with i2d_flag point type alternating the settings of edge flags on and off with a round cap style, a width of 5.0, and a red line color. The other outline has all edges on, beveled joins, green line color, a width of 7.0, and butt cap. Markers are displayed at each of the vertexes to easily check the joins.
Attributes Tested: XGL_CAP_BUTT

Operators Tested: xgl_object_set
Output:· line21Two outlines of geckos, one with red line color and alternating on/off line segments, and the other with a blunt join, all segments on and a green line color
Test Types:INDEX, CM
Description:Sets the join miter limit so low that we expect beveled joins and observe the joins for acute and obtuse angles using flag_pt_2d point type
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_JOIN
                    XGL_CTX_LINE_MITER_LIMIT
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_JOIN_BEVEL
                    XGL_JOIN_MITER
                    XGL_LINE_SOLID
                    XGL_SET_EDGE_FLAG
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             The raster is covered with two wide segmented lines in a

variety of colors with acute and obtuse angles. Markers indicate the position of the vertexes.
· line22
Test Types:INDEX, CM
Description:Extremely acute angles formed by a two-segmented line with an extremely high value for the miter limit to force knife edges. Widths are set alternating between 5.0 and 7.0 and the point type used is flag_2d.
Attributes Tested: XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_JOIN
                    XGL_CTX_LINE_MITER_LIMIT
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_JOIN_MITER
                    XGL_LINE_SOLID
                    XGL_SET_EDGE_FLAG
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             The raster is covered with v-shaped wide lines with knife
                    edges in a variety of colors.

· line24
Test Types:...INDEX, CM
Description:...Renders a simple white index horizontal line inside a window raster whose x, y, and z values range from 0 to 1 via the setting for the window bounds under a virtual device mapping system of ASPECT
Attributes Tested: XGL_CTX_VDC_MAP
                    XGL_CTX_VDC_WINDOW
                    XGL_VDC_MAP_ASPECT
Operators Tested:   xgl_object_set
                    xgl_multipolyline
Output:             A simple white horizontal line

· line25
Test Types:INDEX, CM
Description:Tests line attributes for line width and line style inside a window raster whose x, y, and z values range from 0 to 1 via the setting for the window bounds and an orientation such that y is up and z is nearly below a virtual device mapping system of ASPECT
Attributes Tested: XGL_CTX_BACKGROUND_COLOR

Operators Tested: xgl_object_set
Output:.....A variety of patterned and colored horizontal lines forming two columns in the window raster
· line26
Test Types:INDEX, CM
Description:Pushes attributes, renders, pushes new attributes, renders, pops attributes, expects the just set attributes, pops again and expects the originally set attributes. Uses this scheme to verify the push/pop scheme for line style, line width, and line color.
Attributes Tested: XGL_CTX_BACKGROUND_COLOR
                    XGL_CTX_LINE_COLOR
                    XGL_CTX_LINE_PATTERN
                    XGL_CTX_LINE_STYLE
                    XGL_CTX_LINE_WIDTH_SCALE_FACTOR
                    XGL_CTX_VDC_MAP
                    XGL_VDC_MAP_ASPECT
                    XGL_CTX_VDC_ORIENTATION
                    XGL_Y_UP_Z_TOWARD
                    XGL_CTX_VDC_WINDOW
                    XGL_LINE_PATTERNED
                    XGL_LINE_SOLID
Operators Tested:   xgl_object_set
                    xgl_multipolyline
                    xgl_context_push
                    xgl_context_pop
Output:             A variety of patterned and colored horizontal lines

forming two columns in the window raster
· line27
Test Types:INDEX, CM
Description:Loops through two settings for line width, 1.0 and 5.0, with seven colors for the individual segment for the line against both win_ras and mem_ras. The seven different arrangements for rendering color of the lines are: o Same color at each end
o Different colors at each end o Reversed colors
o Same color for first segment o Different colors for each segment o Multiple polylines
o Single pixel
Attributes Tested: XGL_3D_CTX_LINE_COLOR_INTERP
XGL_MEM_RAS
XGL_RAS_DEPTH
XGL_RAS_WIDTH
XGL_RAS_HEIGHT

Operators Tested: xgl_object_set
Output:.....Lines with above arrangements with color scheme: o red negative sloped line
o horizontal cyan line o horizontal red line o red for the first segment, cyan for the second segment o blue for the first segment, white for the second segment o two horizontal lines; top is blue, bottom is white o like a red pixel