TestCoverage/11-Painting-Filling-Stroking-Colors-and-Paint-Servers

From SVG

This page is an archive of the previous Group's wiki from http://www.w3.org/Graphics/SVG/Group/wiki.


Test Coverage for SVG Tiny 1.2 Chapter 11: Painting: Filling, Stroking, Colors and Paint Servers

[1]

Legend:

 - is a comment or note
  is an assertion or feature that is fully covered in the test suite
 # is an assertion or feature that is partially or not covered in the test suite

11.3 Fill Properties

# Test 'fill' animation.
 - Test 'fill-rule' for the following values: nonzero | evenodd | inherit.


# Test for inherit.


# Test 'fill-rule' animation.
 - Test 'fill-opacity' for the following values: <opacity-value> | inherit.


# Test for inherit.


# Test 'fill-opacity' animation.

11.4 Stroke Properties

# Test 'stroke' animation.


# "For strokes, such as dash patterns whose computations are dependent on progress along the outline of the graphics element, distance calculations must use the SVG user agent's standard Distance along a path algorithms".
 - Not sure if this is testable


# "When stroking is performed using a complex paint server, such as a gradient, the stroke operation must be identical to the result that would have occurred if the geometric shape defined by the geometry of the current graphics element and its associated stroking properties were converted to an equivalent 'path' element and then filled using the given paint server".
 - Test has a path that is of the same dimensions as stroked rect. Gradient fill applied to both.


# "A subpath (see Paths) consisting of a single moveto shall not be stroked. A subpath consisting of a moveto and lineto to the same exact location or a subpath consisting of a moveto and a closepath shall not be stroked if the 'stroke-linecap' property has a value of butt and shall be stroked if the 'stroke-linecap' property has a value of round or square, producing respectively a circle or a square centered at the given point".
 - "Test has a path with a single 'moveto', stroke-linecap of round, and a stroke applied. Test has a path with 'moveto', 'lineto', stroke-linecap of round, and a stroke applied. Test has a path with 'moveto', 'closepath', stroke-linecap of square, and a stroke applied. Test has a path with 'moveto', 'closepath', stroke-linecap of butt, and a stroke applied".


# Test 'stroke-width' for the following values: <length> | inherit.


# Test 'stroke-width' animation.


# Test 'stroke-linecap' for the following values: butt | round | square | inherit.
 - test for butt, square, inherit.


# Test 'stroke-linecap' animation.


# "No stroke shall be painted for a zero value. A negative value is unsupported and must be treated as if the stroke had not been specified".
 - Test has a rect with a stroke and stroke-width of 0. Test has a rect with a stroke and stroke-width of -1.


# Test 'stroke-linejoin' for the following values: miter | round | bevel | inherit.
 - test for bevel, inherit.


# Test 'stroke-linejoin' animation.


# "The value of <miterlimit> must be a number greater than or equal to 1. Any other value shall be treated as unsupported and processed as if the property had not been specified".
 - Test 'stroke-miterlimit' of 0.5 specified.


# Test 'stroke-miterlimit' animation.


# Test 'stroke-dasharray' for the following values: none | <dasharray> | inherit.
 - Test for inherit.


# "The computed value of the attribute stroke-linecap is applied to both sides of each dash. If a dash has zero length, linecaps are still added if the stroke-linecap values round and square are used".
 - Test has a rect with stroke, 'stroke-dasharray' with at least 1 zero length dash, 'stroke-linecap' set to round.


# "A negative <length> value shall be treated as unsupported and processed as if the property had not been specified. If the sum of the <length>'s is zero, then the stroke shall be rendered as if a value of none were specified".
 - Test 'stroke-dasharray' for out-of-bounds values.


# Test 'stroke-dasharray' animation.


# Test 'stroke-dashoffset' for the following values: <length> | inherit.
 - Test for inherit.


# Test 'stroke-dashoffset' animation.


# Test 'stroke-opacity' for the following values: <opacity-value> | inherit.
 - Test for inherit.


# Test 'stroke-opacity' animation.

11.5 Non-Scaling Stroke

# Test 'vector-effect' for the following values: non-scaling-stroke | none | inherit
 - Test 'vector-effect' animation

11.6.1 Compositing the currentColor value

# "The currentColor value may be assigned a color value that has an opacity component. This opacity value is used in the rendering operation using the alpha compositing method described above".
 - Test sets a color with an opacity value. The currentColor references solidColor.

11.7 The 'viewport-fill' Property

# Test 'viewport-fill' for the following values: "none" |  <color> | inherit.
 - Test none, inherit.


# Test 'viewport-fill' animation.

11.8 The 'viewport-fill-opacity' Property

# Test 'viewport-fill-opacity' for the following values: <opacity-value> | inherit.
 - Test inherit.


# Test 'viewport-fill-opacity' animation.

11.9 Controlling visibility and rendering

# Test 'display' on applicable elements for the following values:
  inline | block | list-item | run-in | compact | marker | table |
  inline-table | table-row-group | table-header-group | table-footer-group |
  table-row | table-column-group | table-column | table-cell |
  table-caption | none | inherit.


# Test 'display' animation.


# Test 'visibility' on applicable elements for the following values: visible | hidden | collapse | inherit.


# Test 'visibility' animation.


# Test that has 'display' none and 'visibility' hidden on objects to highlight the different effects that properties have. On a graphical object. Have a case in the tests where display="none" and visibility="hidden" is applied to a single object

11.10.1 The 'color-rendering' property

"The 'color-rendering' property provides a hint to the SVG user agent about how to optimize its color interpolation and compositing operations".
 - This isn't really an assertion, more so saying a user agent can optimize if it wants to. We can still write a test for it, but not as cruitial as a testable assertion.


# Test 'color-rendering' for the following values:
  auto | optimizeSpeed | optimizeQuality | inherit
 - The test should contain an object with a fill specified in sRGB, and have the device RGB that has a smaller gamut than the sRGB gamut. The fill of the object should be a colour not in the device RGB gamut such that a setting of 'optimizeSpeed' will show the colour being clamped to the device RGB gamut.


# Test 'color-rendering' animation

11.10.2 The 'shape-rendering' property

- Similar comment to 11.10.1.


# Test 'shape-rendering' for the following values: auto | optimizeSpeed | crispEdges | geometricPrecision | inherit.
 - Test would contain fine lines to highlight the effects of each value.


# Test 'shape-rendering' animation.

11.10.3 The 'text-rendering' property

- Similar comment to 11.10.1.


# Test 'text-rendering' for the following values: auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit.
 - Test would contain glyphs with fine lines to highlight the effects of each value.


# Test 'text-rendering' animation.

11.10.4 The 'image-rendering' property

- Similar comment to 11.10.1.


# Test 'image-rendering' for the following values: auto | optimizeSpeed | optimizeQuality | inherit.
 - Test would contain a large image to emphasize the effect of the different values.


# Test 'image-rendering' animation.

11.11 Inheritance of painting properties

# Test paint server fill on a 'g' element. 'g' element contains objects that inherit the fill.


# Test gradient fill in defs with objectBoundingBox set. Gradient is applied to object.


- Could combine tests in this section. Use example 11_01.svg as a test?

11.12 Object and group opacity: the 'opacity' property

# Test 'opcaity' for the following values: <opacity-value> | inherit.
 - Test contains an object with a fill-opacity and an opacity applied.
 - Test contains opacity values out of 0.0 and 1.0 range.


# Test 'opacity' animation.

11.13.1 Syntax for color values

# Test contains the keyword colors that must be supported in 11.13.2. All colors are specified in keyword, Three digit hex, Six digit hex, Integer functional, and Float functional.


# test for all 16 HTML Color keywords.

11.14.1 System Paint Servers

# "The following list of System Paint Servers must be supported. If a paint specification specifies one of the System Paint Servers, then the user agent must either paint using a system-provided paint server or paint with a substitute paint server, such as a color or gradient".
 - Test respective object for each possible System Paint Server. A reference image for this test would not be possible as each system will potentially have a different color for each System Paint Server.


# test for the following System Paint Servers not currently tested: ButtonText, GrayText, Highlight, InactiveBorder, InactiveCaption,
  InactiveCaptionText, InfoBackground, InfoText, Scrollbar, ThreeDHighlight, ThreeDShadow.

11.14.2 The solidColor Element

# Test 'solid-color' in a solidColor element for the following values: currentColor | <color> | inherit.
 - Test currentColor, inherit.


# Test 'solid-opacity' in a solidColor element for the following values: <opacity-value> | inherit.
 - Test inherit.

11.16.1 Linear gradients

# Test the various defined values for the attributes on a linearGradient.
 - Test animation of linearGradient attributes.


# Test the case where x1,x2,y1,y2 are not specified.
 - Test the case where x1 = x2 and y1 = y2, using a linearGradient with multiple stops.


# "If the gradient starts or ends inside the bounds of the target rectangle the terminal colors of the gradient shall be used to fill the remainder of the target region".
 - May need a specific test case for this assertion.


# "The 'display' property does not apply to the 'linearGradient' element".
 - Test for the case when display is set to none on a linearGradient element.

11.16.2 Radial gradients

 # Test the various defined values for the attributes on a radialGradient.


 # Test animation of radialGradient attributes.


# "A negative value shall be treated as unsupported. A value of zero shall cause the area to be painted as a single color using the color and opacity of the last gradient stop".
 - Test r for out-of-bounds values.
 - Test the case where r = 0, using a radialGradient with multiple stops.


# "If the gradient starts or ends inside the bounds of the object(s) being painted by the gradient the terminal colors of the gradient shall be used to fill the remainder of the target region".


# "Properties shall inherit into the 'radialGradient' element from its ancestors; properties shall not inherit from the element referencing the 'radialGradient' element".


# "The 'display' property does not apply to the 'radialGradient' element".
 - Test for the case when display is set to none on a radialGradient element.

11.16.3 The 'stop' element, defining gradient stops

# Test for offset = "<number>".


# Test 'offset' animation.