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 7: Coordinate Systems, Transformations and Units



 - 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

7.2 The initial viewport

"If the parent document format defines rules for referenced or embedded graphics content, then the negotiation process is determined by the parent document format specification".
 - Not sure if this assertion is testable.

# Test needed where a parent document has embedded SVG. Parent document needs to define rules for embedded graphics.

# "If the parent document is styled with CSS, then the negotiation process must follow the CSS rules for replaced elements".

# "If there are CSS width and height properties (or corresponding XSL properties) on the referencing element (or rootmost svg element for inline SVG content) that are sufficient to establish the width and height of the viewport, then these positioning properties establish the viewport's width, height, and aspect ratio".
 - Probably a test with a number of different cases is required here.

7.4 Coordinate system transformations

# "Translation is equivalent to the matrix [1 0 0 1 tx ty]".

# "Scaling is equivalent to the matrix [sx 0 0 sy 0 0]".

# "Rotation about the origin is equivalent to the matrix [cos(a) sin(a) -sin(a) cos(a) 0 0]".

# "A skew transformation along the x-axis is equivalent to the matrix [1 0 tan(a) 1 0 0]".

# "A skew transformation along the y-axis is equivalent to the matrix [1 tan(a) 0 1 0 0]".

# The tests in section 7.6.1 should also do comparisons against their matrix equivalents in coords-trans-09-t.svg

7.6 The transform attribute

# "Specifying a value of none has the same meaning as the identity matrix".
 - There is no test that covers this case explicitly.

# "If the transform attribute cannot be parsed according to either of the syntaxes above, the user agent must treat the element as if the transform attribute had not been specified".
 - There is no test that covers this case explicitly.

# "Attributes 'x', 'y', 'width' and 'height' (and any other attributes or properties) are treated as values in the new user coordinate system"
 - There is no test that covers this case explicitly. Test requires a transform to be specified on the object element.

7.8 The 'viewBox' attribute

- The test coords-viewattr-06-t.svg tests the overflow attribute. This test only partially covers this section. The test also needs to be modified as overflow is currently not specified in the spec but tested in the test.

# Test viewBox min-x, min-y, width, height applied to different elements; images(pixel | SVG), animation, video, symbol, use.

# Test to check if viewBox and scale are handled the same.

7.9 The 'preserveAspectRatio' attribute

 - Tests preserveAspectRatio applied to an embedded image.

 - Tests preserveAspectRatio applied to animation element.

 - Tests preserveAspectRatio applied to video element.

 - Tests preserveAspectRatio applied to external image.

 - preserveAspectRatio applied to svg element.

# Test preserveAspectRatio applied to symbol, use. Test all different cases for each; defer, all alignment values, all alignment values with 'meet' option.

7.11 Units

# Test unit specifiers 'in', 'cm', 'mm', 'pt', 'pc', 'px' on 'width' and 'height' of an 'svg' element. May have issues developing reference images for this test.

7.15 The svg:transform attribute

# Maybe a single test case for this.