Full version, Basic version

Specification link: 13.2 Gradients

pservers-grad-08-b ← index → pservers-grad-10-b

# pservers-grad-09-b
SVG Image | PNG Image

Test that the viewer can handle the gradientUnits attribute on linear gradients. It tests the following values of gradientUnits : default (userSpace), objectBoundingBox, and userSpaceOnUse.

From top-down the appearance of objects is as follows.

The first rectangle uses the default attributes on the linearGradient element. Therefore the linear gradient should default to objectBoundingBox. It should appear from the left edge of therectangle (blue) to the right edge of the rectangle (red). The rectangle is smaller than the viewport, because a previous version of the SVG spec had the default value be 'viewport'. The test fails if only a portion of the gradient is shown.

The next rectangle uses gradientUnits=objectBoundingBox. The linear gradient should travel from blue (top) to red (bottom).

The last rectangle uses gradientUnits=userSpaceOnUse. The rectangle element is given it's own transformation and the gradient is assumed to be in this user space. The gradient should appear as a linear gradient from red (left) to blue (right).

The rendered picture should match the reference image exactly, except for possible variations in the labelling text (per CSS2 rules).

pservers-grad-08-b ← index → pservers-grad-10-b

Distributed under both the W3C Test Suite License and the W3C 3-clause BSD License.
To contribute to a W3C Test Suite, see the policies and contribution forms.