[librsvg/rustification] Add official test files for gradients. Some do not pass.
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] Add official test files for gradients. Some do not pass.
- Date: Fri, 11 Nov 2016 17:03:46 +0000 (UTC)
commit 38927a65143819acd00efc10288267baf1a78a5b
Author: Federico Mena Quintero <federico gnome org>
Date: Fri Nov 11 10:40:48 2016 -0600
Add official test files for gradients. Some do not pass.
Mysteriously, pservers-grad-19-b.svg is missing from the original
tarball of tests.
.../reftests/svg1.1/pservers-grad-09-b-ref.png | Bin 0 -> 6268 bytes
.../reftests/svg1.1/pservers-grad-09-b.svg | 107 ++++++++++++
.../reftests/svg1.1/pservers-grad-10-b-ref.png | Bin 0 -> 9316 bytes
.../reftests/svg1.1/pservers-grad-10-b.svg | 93 +++++++++++
.../reftests/svg1.1/pservers-grad-11-b-ref.png | Bin 0 -> 57420 bytes
.../reftests/svg1.1/pservers-grad-11-b.svg | 124 ++++++++++++++
.../reftests/svg1.1/pservers-grad-12-b-ref.png | Bin 0 -> 23962 bytes
.../reftests/svg1.1/pservers-grad-12-b.svg | 110 +++++++++++++
.../reftests/svg1.1/pservers-grad-13-b-ref.png | Bin 0 -> 98222 bytes
.../reftests/svg1.1/pservers-grad-13-b.svg | 171 ++++++++++++++++++++
.../reftests/svg1.1/pservers-grad-14-b-ref.png | Bin 0 -> 24931 bytes
.../reftests/svg1.1/pservers-grad-14-b.svg | 120 ++++++++++++++
.../reftests/svg1.1/pservers-grad-15-b-ref.png | Bin 0 -> 10232 bytes
.../reftests/svg1.1/pservers-grad-15-b.svg | 70 ++++++++
.../reftests/svg1.1/pservers-grad-16-b-ref.png | Bin 0 -> 6618 bytes
.../reftests/svg1.1/pservers-grad-16-b.svg | 81 +++++++++
.../reftests/svg1.1/pservers-grad-17-b-ref.png | Bin 0 -> 9478 bytes
.../reftests/svg1.1/pservers-grad-17-b.svg | 92 +++++++++++
.../reftests/svg1.1/pservers-grad-18-b-ref.png | Bin 0 -> 5654 bytes
.../reftests/svg1.1/pservers-grad-18-b.svg | 114 +++++++++++++
.../reftests/svg1.1/pservers-grad-20-b-ref.png | Bin 0 -> 9478 bytes
.../reftests/svg1.1/pservers-grad-20-b.svg | 92 +++++++++++
.../reftests/svg1.1/pservers-grad-21-b-ref.png | Bin 0 -> 12246 bytes
.../reftests/svg1.1/pservers-grad-21-b.svg | 146 +++++++++++++++++
.../reftests/svg1.1/pservers-grad-22-b-ref.png | Bin 0 -> 7596 bytes
.../reftests/svg1.1/pservers-grad-22-b.svg | 97 +++++++++++
.../reftests/svg1.1/pservers-grad-23-f-ref.png | Bin 0 -> 6522 bytes
.../reftests/svg1.1/pservers-grad-23-f.svg | 80 +++++++++
.../reftests/svg1.1/pservers-grad-24-f-ref.png | Bin 0 -> 7711 bytes
.../reftests/svg1.1/pservers-grad-24-f.svg | 68 ++++++++
30 files changed, 1565 insertions(+), 0 deletions(-)
---
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-09-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-09-b-ref.png
new file mode 100644
index 0000000..5d483df
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-09-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-09-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-09-b.svg
new file mode 100644
index 0000000..670e914
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-09-b.svg
@@ -0,0 +1,107 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
+ version="$Revision: 1.9 $" testname="$RCSfile: pservers-grad-09-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test that the viewer can handle the gradientUnits attribute on linear gradients.
+ It tests the following values of gradientUnits: default (userSpace), objectBoundingBox,
+ and userSpaceOnUse.
+ </p>
+ <p>
+ From top-down the appearance of objects is as follows.
+ </p>
+ <p>
+ 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 the rectangle (blue) to the right edge of the rectangle (lime).
+ 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.
+ </p>
+ <p>
+ The next rectangle uses gradientUnits=objectBoundingBox. The linear gradient should
+ travel from blue (top) to lime (bottom).
+ </p>
+ <p>
+ 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 lime (left) to blue (right).
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>Run the test. No interaction required.</p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test passes if the rendering matches the reference image, apart
+ from any differences in font choice due to CSS2 rules. Specifically:</p>
+ <ul>
+ <li>The top rectangle is filled with a linear gradient from lime on the left to blue on the
right.</li>
+ <li>The middle rectangle is filled with a linear gradient from blue on the top to lime on the
bottom.</li>
+ <li>The bottom rectangle is filled with a linear gradient from lime on the left to blue on the
right.</li>
+ </ul>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-09-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="15" x="10" y="25">Testing gradientUnits attribute</text>
+ <!-- ====================================================================== -->
+ <!-- Linear gradient with default attributes on <linear gradient> element. -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad1">
+ <stop stop-color="lime" offset="0"/>
+ <stop stop-color="blue" offset="1"/>
+ </linearGradient>
+ <rect x="125" y="35" width="200" height="50" fill="url(#Grad1)"/>
+ <!--<text font-size="12" x="10" y="100">Linear gradient with default attributes (thus, same as
objectBoundingBox)</text>-->
+ <!--text font-size="12" x="10" y="125">Gradient is from the viewport left edge (lime) to viewport right
edge (blue)</text-->
+ <!--<text font-size="12" x="10" y="115">Gradient is from the object left edge (lime) to object right
edge (blue)</text>-->
+ <!-- ====================================================================== -->
+ <!-- Linear gradient with gradientUnits=objectBoundingBox ======== -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad2" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="0" y2="1">
+ <stop stop-color="blue" offset="0"/>
+ <stop stop-color="lime" offset="1"/>
+ </linearGradient>
+ <rect x="10" y="125" width="430" height="50" fill="url(#Grad2)"/>
+ <!--<text font-size="12" x="10" y="190">gradientUnits=objectBoundingBox</text>-->
+ <!--<text font-size="12" x="10" y="205">Gradient is from the object top edge (blue) to object bottom
edge (lime)</text>-->
+ <!-- ====================================================================== -->
+ <!-- Gradient using gradientUnits="userSpaceOnUse" -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad3" x1="0" y1="0" x2="0" y2="430" gradientUnits="userSpaceOnUse">
+ <stop stop-color="lime" offset="0"/>
+ <stop stop-color="blue" offset="1"/>
+ </linearGradient>
+ <rect transform="translate(10, 260) rotate(-90)" x="0" y="0" width="50" height="430" fill="url(#Grad3)"/>
+ <!--<text font-size="12" x="10" y="275">gradientUnits=userSpaceOnUse</text>-->
+ <!--<text font-size="12" x="10" y="290">Gradient is from the object left edge (lime) to object right
edge (blue)</text>-->
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-10-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-10-b-ref.png
new file mode 100644
index 0000000..8823dbb
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-10-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-10-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-10-b.svg
new file mode 100644
index 0000000..52d893e
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-10-b.svg
@@ -0,0 +1,93 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
+ version="$Revision: 1.8 $" testname="$RCSfile: pservers-grad-10-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test that the viewer can handle the spreadMethod attribute on linear gradients.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test passes if the rendering matches the reference image, apart
+ from any differences in font choice due to CSS2 rules. Each of the
+ three rectangles is filled with a linear gradient from blue on the left
+ to lime on the right. The width of the gradient is only a fifth of
+ the width of the rectangle, so:</p>
+ <ul>
+ <li>The top rectangle is filled with plain blue in the left two-fifths
+ and with plain lime in the right two-fifths.</li>
+ <li>The middle rectangle is filled with alternating copies of the blue-to-lime
+ gradient. Thus, from left to right, the rectangle is filled with
+ a gradient that goes from blue to lime to blue to lime to blue to lime.</li>
+ <li>The bottom rectangle is filled with five copies of the blue-to-lime
+ gradient. Thus, from left to right, the rectangle is filled with
+ a gradient that goes from blue to lime, abruptly changing back to blue
+ then smoothly changing to lime, etc.</li>
+ </ul>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-10-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="15" x="10" y="25">Testing spreadMethod attribute</text>
+ <!-- ====================================================================== -->
+ <!-- Linear Gradient with spreadMethod=pad -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad1" gradientUnits="objectBoundingBox" x1=".4" y1="0" x2=".6" y2="0"
spreadMethod="pad">
+ <stop stop-color="blue" offset="0"/>
+ <stop stop-color="lime" offset="1"/>
+ </linearGradient>
+ <rect x="10" y="35" width="460" height="55" fill="url(#Grad1)"/>
+ <text font-size="12" x="10" y="105">spreadMethod=pad</text>
+ <!-- ====================================================================== -->
+ <!-- Linear Gradient with spreadMethod=reflect -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad2" gradientUnits="objectBoundingBox" x1=".4" y1="0" x2=".6" y2="0"
spreadMethod="reflect">
+ <stop stop-color="blue" offset="0"/>
+ <stop stop-color="lime" offset="1"/>
+ </linearGradient>
+ <rect x="10" y="120" width="460" height="55" fill="url(#Grad2)"/>
+ <text font-size="12" x="10" y="190">spreadMethod=reflect</text>
+ <!-- ====================================================================== -->
+ <!-- Linear Gradient with spreadMethod=repeat -->
+ <!-- ====================================================================== -->
+ <linearGradient id="Grad3" gradientUnits="objectBoundingBox" x1=".4" y1="0" x2=".6" y2="0"
spreadMethod="repeat">
+ <stop stop-color="blue" offset="0"/>
+ <stop stop-color="lime" offset="1"/>
+ </linearGradient>
+ <rect x="10" y="205" width="460" height="55" fill="url(#Grad3)"/>
+ <text font-size="12" x="10" y="275">spreadMethod=repeat</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="lime" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-11-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-11-b-ref.png
new file mode 100644
index 0000000..a69e0e6
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-11-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-11-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-11-b.svg
new file mode 100644
index 0000000..dc5e212
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-11-b.svg
@@ -0,0 +1,124 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
+ version="$Revision: 1.8 $" testname="$RCSfile: pservers-grad-11-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test that the viewer has basic capability to handle radial gradients
+ on fills and stroke of objects and text.
+ </p>
+ <p>
+ This test uses the following elements : <radialGradient>, <stop>
+ and the following properties : stop-color, fill:url(# ), stroke(url# )
+ </p>
+ <p>
+ From top-down (left to right) the appearance of objects is as follows.
+ </p>
+ <p>
+ The top left rectangle should be a radial gradient from dark blue (in) to lime (outside).
+ The gradient is applied to the fill of the rectangle.
+ </p>
+ <p>
+ The next rectangle has no fill, but has a thick stroke on which the gradient is
+ applied. The gradient goes from dark orange(in) to pale yellow (out).
+ </p>
+ <p>
+ The next item is a text with a radial gradient on the fill. The gradient goes
+ from green (in) to yellow (out).
+ </p>
+ <p>
+ The last item is a text with a 2 user unit stroke on which a black (in) to magenta
+ (out) linear gradient is applied.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>Run the test. No interaction required.</p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test passes if the rendering matches the reference image, apart
+ from any differences in font choice due to CSS2 rules. Specifically:</p>
+ <ul>
+ <li>The top-left rectangle must be filled with a circular radial gradient
+ with dark blue inside and lime outside. The center point of the gradient
+ is in the lower-left quadrant of the rectangle.</li>
+ <li>The top-right rectangle has no fill, but a thick stroke which is painted
+ with a radial gradient with dark orange inside and yellow outside. The
+ center point of this gradient is in the lower-left quadrant of the
+ rectangle.</li>
+ <li>The "Gradient on text fill" text must be filled with a circular radial
+ gradient with green inside and yellow outside. The center point of the
+ gradient is the center of the text.</li>
+ <li>The "Gradient on text stroke" has no fill, but a stroke which is painted with
+ a circular radial gradient with black inside and pink outside. The center point of the
+ gradient is the center of the text.</li>
+ </ul>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-11-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- ====================================================================== -->
+ <!-- Very simple black to red radial gradient ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient gradientUnits="userSpaceOnUse" id="Grad1" cx="75" cy="100" r="130" fx="75" fy="100">
+ <stop stop-color="#009" offset="0"/>
+ <stop stop-color="#2e2" offset="1"/>
+ </radialGradient>
+ <rect x="10" y="10" width="210" height="140" fill="url(#Grad1)"/>
+ <text font-family="Arial" font-size="12" x="10" y="165">Radial gradient on fill of rectangle</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient on the stroke of a rectangle ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad2" gradientUnits="userSpaceOnUse" cx="295" cy="100" r="150" fx="295" fy="100">
+ <stop stop-color="#e22" offset="0"/>
+ <stop stop-color="#ff6" offset="1"/>
+ </radialGradient>
+ <rect x="250" y="30" width="170" height="100" fill="none" stroke="url(#Grad2)" stroke-width="40"/>
+ <text font-family="Arial" font-size="12" x="230" y="165">Radial gradient on stroke of rectangle</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient on fill of text ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad3" gradientUnits="userSpaceOnUse" cx="225" cy="180" r="90" fx="225" fy="180">
+ <stop stop-color="#060" offset="0"/>
+ <stop stop-color="yellow" offset="1"/>
+ </radialGradient>
+ <text font-family="Arial" font-size="50" fill="url(#Grad3)" x="10" y="210">Gradient on text fill</text>
+ <text font-family="Arial" font-size="12" x="10" y="225">Radial gradient on text, black to yellow</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient on stroke of text ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad4" gradientUnits="userSpaceOnUse" cx="225" cy="245" r="90" fx="225" fy="245">
+ <stop stop-color="black" offset="0"/>
+ <stop stop-color="#D6D" offset="1"/>
+ </radialGradient>
+ <text font-family="Arial" font-size="45" fill="none" stroke="url(#Grad4)" stroke-width="2" x="10"
y="270">Gradient on text stroke</text>
+ <text font-family="Arial" font-size="12" x="10" y="285">Radial gradient on stroke of text, black to
red</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.8 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-12-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-12-b-ref.png
new file mode 100644
index 0000000..0f8544a
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-12-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-12-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-12-b.svg
new file mode 100644
index 0000000..d00f73a
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-12-b.svg
@@ -0,0 +1,110 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="SVGWG" author="Haroon Sheikh" status="accepted"
+ version="$Revision: 1.9 $" testname="$RCSfile: pservers-grad-12-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test that the viewer can handle the gradientUnits attribute on radial gradients.
+ It tests the following values of gradientUnits: default (objectBoundingBox), objectBoundingBox,
+ and userSpaceOnUse.
+ </p>
+ <p>
+ From top-down the appearance of objects is as follows.
+ </p>
+ <p>
+ The first rectangle uses the default attributes on the radialGradient element.
+ Therefore the radial gradient should be relative to the object bounding box. It should appear
+ from the center of the viewport (blue) to the edges of the viewport (lime).
+ The rectangle is wider than tall so it the gradient should be elliptical, not circular.
+ </p>
+ <p>
+ The next rectangle uses gradientUnits=objectBoundingBox. The radial gradient should
+ travel from a center of 20%, 20% of the rectangle with a radius of 50%.
+ </p>
+ <p>
+ 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 in the center of the rectangle as a radial gradient from yellow (center)
to blue (edge).
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>Run the test. No interaction required.</p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test passes if the rendering of the three rectangles matches those
+ in the reference image. Specifically:</p>
+ <ul>
+ <li>The upper rectangle is filled with an elliptical radial gradient
+ with blue at the center and lime at its edges.</li>
+ <li>The middle rectangle is also filled with an elliptical radial
+ gradient with blue inside and lime outside, but with the center
+ point of the gradient in the top-left quadrant of the rectangle.</li>
+ <li>The bottom rectangle is filled with a circular radial gradient
+ with yellow at the center and blue at its edges. Since it is circular,
+ most of the rectangle is filled with plain blue.</li>
+ </ul>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-12-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text font-size="15" x="10" y="25">Testing gradientUnits attribute</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient with default attributes on <radial gradient> element. -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad1">
+ <stop stop-color="#009" offset="0"/>
+ <stop stop-color="lime" offset="1"/>
+ </radialGradient>
+ <rect x="10" y="35" width="460" height="50" fill="url(#Grad1)"/>
+ <text font-size="12" x="10" y="100">Radial gradient with default attributes (from blue to yellow)</text>
+ <text font-size="12" x="10" y="115">Gradient is blue at the object center and lime at the object
edges</text>
+ <!-- ====================================================================== -->
+ <!-- Radial gradient with gradientUnits=objectBoundingBox ======== -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad2" gradientUnits="objectBoundingBox" cx=".2" cy=".2" fx=".2" fy=".2" r=".5">
+ <stop stop-color="#009" offset="0"/>
+ <stop stop-color="lime" offset="1"/>
+ </radialGradient>
+ <rect x="10" y="125" width="460" height="50" fill="url(#Grad2)"/>
+ <text font-size="12" x="10" y="190">gradientUnits=objectBoundingBox</text>
+ <text font-size="12" x="10" y="205">cx=.2, cy=.2, r=.5, fx=.2 fy=.2</text>
+ <!-- ====================================================================== -->
+ <!-- Gradient using gradientUnits="userSpaceOnUse" -->
+ <!-- ====================================================================== -->
+ <radialGradient id="Grad3" cx="25" cy="215" r="25" fx="25" fy="215" gradientUnits="userSpaceOnUse">
+ <stop stop-color="yellow" offset="0"/>
+ <stop stop-color="blue" offset="1"/>
+ </radialGradient>
+ <rect transform="translate(10, 260) rotate(-90)" x="0" y="0" width="50" height="460" fill="url(#Grad3)"/>
+ <text font-size="12" x="10" y="275">gradientUnits=userSpaceOnUse</text>
+ <text font-size="12" x="10" y="290">Gradient is yellow to blue radial gradient from center to horizontal
bounds</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.9 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-13-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-13-b-ref.png
new file mode 100644
index 0000000..c24aea4
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-13-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-13-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-13-b.svg
new file mode 100644
index 0000000..02d6769
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-13-b.svg
@@ -0,0 +1,171 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="CL" author="BB" status="accepted"
+ version="$Revision: 1.5 $" testname="$RCSfile: pservers-grad-13-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ The purpose of this file is to test several values for focal points of radial gradients.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>Run the test. No interaction required.</p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test passes if the rendered image matches the reference image, except
+ for any differences in font choice due to CSS2.</p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-13-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <text x="240" y="30" font-size="20" text-anchor="middle">Radial gradient focal point</text>
+ <defs>
+ <g id="alpha">
+ <rect x="00" y="0" width="100" height="60" fill="yellow"/>
+ <rect x="00" y="0" width="10" height="60" fill="gold"/>
+ <rect x="15" y="0" width="10" height="60" fill="orange"/>
+ <rect x="30" y="0" width="10" height="60" fill="sienna"/>
+ <rect x="45" y="0" width="10" height="60" fill="gold"/>
+ <rect x="60" y="0" width="10" height="60" fill="sienna"/>
+ <rect x="75" y="0" width="10" height="60" fill="orange"/>
+ <rect x="90" y="0" width="10" height="60" fill="gold"/>
+ <rect x="00" y="0" width="100" height="60"/>
+ <!-- inherits a radial gradient -->
+ </g>
+ </defs>
+ <defs>
+ <radialGradient id="grad1a" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="00.00%"
fy="00%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad2a" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="16.66%"
fy="00%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad4a" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="50.00%"
fy="00%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad6a" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="83.33%"
fy="00%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+
+ <radialGradient id="grad1b" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="00.00%"
fy="25%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad2b" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="16.66%"
fy="25%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad4b" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="50.00%"
fy="25%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad6b" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="83.33%"
fy="25%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+
+ <radialGradient id="grad1c" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="00.00%"
fy="50%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad2c" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="16.66%"
fy="50%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad4c" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="50.00%"
fy="50%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad6c" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="83.33%"
fy="50%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+
+ <radialGradient id="grad1d" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="00.00%"
fy="75%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad2d" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="16.66%"
fy="75%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad4d" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="50.00%"
fy="75%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad6d" gradientUnits="objectBoundingBox" cx="10%" cy="10%" r="75%" fx="83.33%"
fy="75%">
+ <stop offset="0" stop-opacity="0"/>
+ <stop offset=".5" stop-color="darkblue"/>
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ </defs>
+
+ <g id="group1" stroke="black" stroke-width="0.5">
+ <use xlink:href="#alpha" x="017.5" y="045" fill="url(#grad1a)"/>
+ <use xlink:href="#alpha" x="130" y="045" fill="url(#grad2a)"/>
+ <use xlink:href="#alpha" x="242.5" y="045" fill="url(#grad4a)"/>
+ <use xlink:href="#alpha" x="355" y="045" fill="url(#grad6a)"/>
+
+ <use xlink:href="#alpha" x="017.5" y="110" fill="url(#grad1b)"/>
+ <use xlink:href="#alpha" x="130" y="110" fill="url(#grad2b)"/>
+ <use xlink:href="#alpha" x="242.5" y="110" fill="url(#grad4b)"/>
+ <use xlink:href="#alpha" x="355" y="110" fill="url(#grad6b)"/>
+
+ <use xlink:href="#alpha" x="017.5" y="175" fill="url(#grad1c)"/>
+ <use xlink:href="#alpha" x="130" y="175" fill="url(#grad2c)"/>
+ <use xlink:href="#alpha" x="242.5" y="175" fill="url(#grad4c)"/>
+ <use xlink:href="#alpha" x="355" y="175" fill="url(#grad6c)"/>
+
+ <use xlink:href="#alpha" x="017.5" y="240" fill="url(#grad1d)"/>
+ <use xlink:href="#alpha" x="130" y="240" fill="url(#grad2d)"/>
+ <use xlink:href="#alpha" x="242.5" y="240" fill="url(#grad4d)"/>
+ <use xlink:href="#alpha" x="355" y="240" fill="url(#grad6d)"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-14-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-14-b-ref.png
new file mode 100644
index 0000000..9ed3805
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-14-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-14-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-14-b.svg
new file mode 100644
index 0000000..63045cf
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-14-b.svg
@@ -0,0 +1,120 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="CL" author="BB" status="accepted"
+ version="$Revision: 1.5 $" testname="$RCSfile: pservers-grad-14-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ The intent of this file is to test the 4 allowed spread methods for linear and radial gradients.
+ The 4 values (pad, reflect, repeat and default) are available for both types of gradients.
+ On the left side are the linear gradient results, and on the right, the radial results.
+ The UA should render a result equivalent to the reference image.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>Run the test. No interaction required.</p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>The test passes if the rendered image matches the reference image, except
+ for any differences in font choice due to CSS2.</p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-14-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient id="lgSpreadPad" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100"
spreadMethod="pad">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <linearGradient id="lgSpreadReflect" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100"
spreadMethod="reflect">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <linearGradient id="lgSpreadRepeat" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100"
spreadMethod="repeat">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <linearGradient id="lgSpreadDefault" gradientUnits="userSpaceOnUse" y1="0" x1="50" y2="0" x2="100">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </linearGradient>
+
+ <radialGradient id="rgSpreadPad" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2"
spreadMethod="pad">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+
+ <radialGradient id="rgSpreadReflect" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2"
spreadMethod="reflect">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+
+ <radialGradient id="rgSpreadRepeat" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2"
spreadMethod="repeat">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+
+ <radialGradient id="rgSpreadDefault" gradientUnits="objectBoundingBox" cx="0.5" cy="0.5" r="0.2">
+ <stop offset="000%" stop-color="black"/>
+ <stop offset="100%" stop-color="gold"/>
+ </radialGradient>
+ </defs>
+
+ <text font-size="20" x="240" y="30" text-anchor="middle">Gradient 'spreadMethod' values</text>
+
+ <rect x="10" y="060" width="225" height="40" fill="url(#lgSpreadPad)" stroke="none"/>
+ <text font-size="16" x="10" y="55">spreadMethod="pad"</text>
+
+ <rect x="10" y="130" width="225" height="40" fill="url(#lgSpreadReflect)" stroke="none"/>
+ <text font-size="16" x="10" y="125">spreadMethod="reflect"</text>
+
+ <rect x="10" y="200" width="225" height="40" fill="url(#lgSpreadRepeat)" stroke="none"/>
+ <text font-size="16" x="10" y="195">spreadMethod="repeat"</text>
+
+ <rect x="10" y="270" width="225" height="40" fill="url(#lgSpreadDefault)" stroke="none"/>
+ <text font-size="16" x="10" y="265">spreadMethod="default"</text>
+
+
+ <rect x="245" y="060" width="225" height="40" fill="url(#rgSpreadPad)" stroke="none"/>
+ <text font-size="16" x="245" y="55">spreadMethod="pad"</text>
+
+ <rect x="245" y="130" width="225" height="40" fill="url(#rgSpreadReflect)" stroke="none"/>
+ <text font-size="16" x="245" y="125">spreadMethod="reflect"</text>
+
+ <rect x="245" y="200" width="225" height="40" fill="url(#rgSpreadRepeat)" stroke="none"/>
+ <text font-size="16" x="245" y="195">spreadMethod="repeat"</text>
+
+ <rect x="245" y="270" width="225" height="40" fill="url(#rgSpreadDefault)" stroke="none"/>
+ <text font-size="16" x="245" y="265">spreadMethod="default"</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-15-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-15-b-ref.png
new file mode 100644
index 0000000..3a27602
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-15-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-15-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-15-b.svg
new file mode 100644
index 0000000..84ecd8f
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-15-b.svg
@@ -0,0 +1,70 @@
+<svg version="1.1" baseProfile="tiny" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="CL" author="CN" status="accepted"
+ version="$Revision: 1.6 $" testname="$RCSfile: pservers-grad-15-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test linear and radial gradient defaults. Includes
+ testing defaults for linear grad x1,y1,y2 = 0%, x2 = 100%.
+ and testing defaults for radial grad cx,cy,r = 50%, fx,fy = cx,cy.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The top rectangle must be blue at the lefthand side and fuchsia at the right
+ hand side, fading smoothly accross. The lower rectangle must be fuchsia at
+ the edges with a black centre to the radial gradient at the centre of the
+ rectangle, and the gradient occupying the whole rectangle.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-15-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- Test defaults for linear grad x1,y1,y2 = 0%, x2 = 100%. -->
+ <linearGradient id="defs1" gradientUnits="objectBoundingBox">
+ <stop stop-color="blue" offset="0"/>
+ <stop stop-color="fuchsia" offset="1"/>
+ </linearGradient>
+ <!-- Test defaults for radial grad cx,cy,r = 50%, fx,fy = cx,cy. -->
+ <radialGradient id="defs2" gradientUnits="objectBoundingBox">
+ <stop stop-color="black" offset="0"/>
+ <stop stop-color="fuchsia" offset="1"/>
+ </radialGradient>
+
+ <rect x="20" y="20" width="440" height="80" fill="url(#defs1)"/>
+ <rect x="20" y="150" width="440" height="80" fill="url(#defs2)"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.6 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-16-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-16-b-ref.png
new file mode 100644
index 0000000..51a882c
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-16-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-16-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-16-b.svg
new file mode 100644
index 0000000..1f62ca8
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-16-b.svg
@@ -0,0 +1,81 @@
+<svg version="1.1" baseProfile="tiny" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="CL" author="CN" status="accepted"
+ version="$Revision: 1.5 $" testname="$RCSfile: pservers-grad-16-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test gradient stop rules. Including:
+ No stops, like fill = none.
+ One stop, like fill = black.
+ If a stop less than all previous stops, it is set equal to the largest stop.
+ If two stops are equal the last stop controls the color at the overlap point.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ [[
+ Describe how to use the here. The instructions should specify any
+ steps requied to run the test or any manual operation that need
+ to be performed to run the test.
+ ]]
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The top rectangle must have a pink outline and no fill. The middle rectangle must have a
+ solid black fill. The lower rectangle must have a yellow to pink to green
+ linear gradient on the left-hand half and a solid blue fill for the right hand half.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-16-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <!-- No stops, like fill = none -->
+ <linearGradient id="defs1" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
+ </linearGradient>
+ <!-- One stop, like fill = black -->
+ <linearGradient id="defs2" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
+ <stop stop-color="black" offset="1"/>
+ </linearGradient>
+ <!-- If a stop less than all previous stops, it is set equal to the largest stop-->
+ <!-- This also tests if two stops are equal the last stop controls the color at the overlap point-->
+ <linearGradient id="defs3" gradientUnits="objectBoundingBox" x1="0" y1="0" x2="1" y2="0">
+ <stop stop-color="yellow" offset="0"/>
+ <stop stop-color="#f48" offset=".25"/>
+ <stop stop-color="green" offset=".5"/>
+ <stop stop-color="blue" offset=".1"/>
+ </linearGradient>
+
+ <rect x="20" y="10" width="440" height="80" fill="url(#defs1)" stroke="#f48"/>
+ <rect x="20" y="110" width="440" height="80" fill="url(#defs2)"/>
+ <rect x="20" y="210" width="440" height="80" fill="url(#defs3)"/>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-17-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-17-b-ref.png
new file mode 100644
index 0000000..49a5c09
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-17-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-17-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-17-b.svg
new file mode 100644
index 0000000..2095289
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-17-b.svg
@@ -0,0 +1,92 @@
+<svg version="1.1" baseProfile="basic" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="AE" author="ED" status="accepted"
+ version="$Revision: 1.4 $" testname="$RCSfile: pservers-grad-17-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ This test has a gradient with gradientUnits='objectBoundingBox' which is a fade from black to
white.
+ The gradient is used for the stroke of a line. Vertical and horizontal lines don't have a
boundingbox,
+ since they are one-dimensional, even though the
+ stroke-width makes it look like they should have a boundingbox with non-zero width and height.
+ See the coordinate chapter, last paragraph of 7.11.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ [[
+ Describe how to use the here. The instructions should specify any
+ steps requied to run the test or any manual operation that need
+ to be performed to run the test.
+ ]]
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The left rectangle has four 'line' elements rotated in different ways. The stroke for the lines have
a green solid stroke fallback which
+ should be used if the gradient should be ignored. For this sub-test to pass there must be three
lines with solid green stroke, and one line
+ (from bottom left to top right) with a gradient stroke, visible in the rectangle.
+ </p>
+ <p>
+ The right rectangle is the same as the left rectangle except that the stroke paintservers don't have
a fallback specified.
+ For this sub-test to pass only the line from bottom left to top right must be visible in the
rectangle, and it must have a gradient stroke.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-17-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient id="grad">
+ <stop offset="0" stop-color="black"/>
+ <stop offset="1" stop-color="white"/>
+ </linearGradient>
+ </defs>
+
+ <!-- sub-test 1: stroke with solid color fallback -->
+ <g transform="translate(50, 100) scale(0.3)">
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad) #0f0" stroke-width="20"/>
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad) #0f0" stroke-width="20"
transform="rotate(45 240 180)"/>
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad) #0f0" stroke-width="20"
transform="rotate(90 240 180)"/>
+ <line x1="410" y1="10" x2="70" y2="350" stroke="url(#grad) #0f0" stroke-width="20"/>
+ <rect x="0" y="-60" width="480" height="480" fill="none" stroke="black"/>
+ </g>
+ <text x="120" y="250" text-anchor="middle">With fallback</text>
+
+ <!-- sub-test 2: stroke without a fallback -->
+ <g transform="translate(280,100) scale(0.3)">
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad)" stroke-width="20"/>
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad)" stroke-width="20" transform="rotate(45 240
180)"/>
+ <line x1="0" y1="180" x2="480" y2="180" stroke="url(#grad)" stroke-width="20" transform="rotate(90 240
180)"/>
+ <line x1="410" y1="10" x2="70" y2="350" stroke="url(#grad)" stroke-width="20"/>
+ <rect x="0" y="-60" width="480" height="480" fill="none" stroke="black"/>
+ </g>
+ <text x="350" y="250" text-anchor="middle">Without fallback</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-18-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-18-b-ref.png
new file mode 100644
index 0000000..b288dc7
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-18-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-18-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-18-b.svg
new file mode 100644
index 0000000..3bb4411
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-18-b.svg
@@ -0,0 +1,114 @@
+<svg version="1.1" baseProfile="tiny" id="svg-root"
+ width="100%" height="100%" viewBox="0 0 480 360"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2009 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="ED" author="CC" status="accepted"
+ version="$Revision: 1.5 $" testname="$RCSfile: pservers-grad-18-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ This test shows rectangles filled with gradient.
+ Several gradients are defined, with two stops:
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ For the top-left rectangle's gradient:
+ The first stop defines a fully-opaque green color.
+ The second stop explicitly inherits (i.e. using the 'inherit' keyword) its stop-color.
+ </p>
+ <p>
+ For the top-right rectangle's gradient:
+ The first stop defines a fully-opaque green color.
+ The second stop defines a green stop-color but explicitly inherits (i.e. using the 'inherit'
keyword) the stop-opacity.
+ </p>
+ <p>
+ For the bottom-left rectangle's gradient:
+ The first stop defines a fully-opaque green color.
+ The second stop does not specify the stop-color and the stop-opacity.
+ Since both properties are not inherited, the initial value should be used.
+ </p>
+ <p>
+ For the bottom-right rectangle's gradient:
+ The first stop defines a fully-opaque green color.
+ The second stop specifies the stop-color using the 'currentColor' keyword.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The result should be:
+ </p>
+ <p>
+ The top-left rectangle is filled with a gradient from green to pink since
+ the stop-color is inherited from the location of the gradient definition.
+ </p>
+ <p>
+ The top-right rectangle filled in green with a gradient opacity.
+ </p>
+ <p>
+ The lower-left rectangle filled with a gradient going from fully-opaque green to fully-opaque black.
+ </p>
+ <p>
+ The lower-right rectangle filled with a gradient going from fully-opaque green to fully-opaque
yellow.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-18-b.svg,v $</title>
+ <defs>
+ <font-face font-family="SVGFreeSansASCII" unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <g id="g0" stop-color="#f48" stop-opacity="0.5" color="yellow">
+ <linearGradient id="MyGradient1" stop-color="inherit">
+ <stop offset="0" stop-color="green" stop-opacity="1"/>
+ <stop offset="1" stop-color="inherit" stop-opacity="1"/>
+ </linearGradient>
+ <linearGradient id="MyGradient2" stop-opacity="inherit">
+ <stop offset="0" stop-color="green" stop-opacity="1"/>
+ <stop offset="1" stop-color="green" stop-opacity="inherit"/>
+ </linearGradient>
+ <linearGradient id="MyGradient3">
+ <stop offset="0" stop-color="green" stop-opacity="1"/>
+ <stop offset="1"/>
+ </linearGradient>
+ <linearGradient id="MyGradient4">
+ <stop offset="0" stop-color="green" stop-opacity="1"/>
+ <stop offset="1" stop-color="currentColor" stop-opacity="1"/>
+ </linearGradient>
+ </g>
+ <g id="g1" stop-color="blue">
+ <rect id="r1" fill="url(#MyGradient1)" width="100" height="100" x="50" y="50"/>
+ </g>
+ <g id="g2" stop-opacity="1">
+ <rect id="r2" fill="url(#MyGradient2)" width="100" height="100" x="200" y="50"/>
+ </g>
+ <g id="g3" stop-opacity="1" stop-color="blue">
+ <rect id="r3" fill="url(#MyGradient3)" width="100" height="100" x="50" y="200"/>
+ </g>
+ <g id="g4" color="blue">
+ <rect id="r4" fill="url(#MyGradient4)" width="100" height="100" x="200" y="200"/>
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none" fill="black">$Revision: 1.5 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-20-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-20-b-ref.png
new file mode 100644
index 0000000..49a5c09
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-20-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-20-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-20-b.svg
new file mode 100644
index 0000000..e1812a1
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-20-b.svg
@@ -0,0 +1,92 @@
+<svg id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="AG" author="ED" status="accepted"
+ version="$Revision: 1.7 $" testname="$RCSfile: pservers-grad-20-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/animate.html#InterfaceSVGAnimationElement">
+ <p>
+ This test has a gradient with gradientUnits='objectBoundingBox' which is a fade from black to
white.
+ The gradient is used for the stroke of a line. Vertical and horizontal lines don't have a
boundingbox, since they are one-dimensional, even though the
+ stroke-width makes it look like they should have a boundingbox with non-zero width and height.
+ See the coordinate chapter, last paragraph of 7.11.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The left rectangle has four 'line' elements rotated in different ways. The stroke for the lines have
a green solid stroke fallback which
+ should be used if the gradient should be ignored.
+
+ The right rectangle is the same as the left rectangle except that the stroke paintservers don't have
a fallback specified.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The test is passed if
+ </p>
+ <ul>
+ <li>
+ there are three lines with solid green stroke, and one line
+ (from bottom left to top right) with a gradient stroke, visible in the left rectangle.
+ </li>
+ <li>there is a line from bottom left to top right with a gradient stroke, visible in the right
rectangle.</li>
+ </ul>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-20-b.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient id="grad">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-color="white" />
+ </linearGradient>
+ </defs>
+
+ <!-- sub-test 1: stroke with solid color fallback -->
+ <g transform="translate(50, 100) scale(0.3)">
+ <path d="M0 180L480 180" stroke="url(#grad) #0f0" stroke-width="20"/>
+ <path d="M0 180L480 180" stroke="url(#grad) #0f0" stroke-width="20" transform="rotate(45 240 180)"/>
+ <path d="M0 180L480 180" stroke="url(#grad) #0f0" stroke-width="20" transform="rotate(90 240 180)"/>
+ <path d="M410 10L70 350" stroke="url(#grad) #0f0" stroke-width="20"/>
+ <rect x="0" y="-60" width="480" height="480" fill="none" stroke="black"/>
+ </g>
+ <text x="120" y="250" text-anchor="middle">With fallback</text>
+
+ <!-- sub-test 2: stroke without a fallback -->
+ <g transform="translate(280,100) scale(0.3)">
+ <path d="M0 180L480 180" stroke="url(#grad)" stroke-width="20"/>
+ <path d="M0 180L480 180" stroke="url(#grad)" stroke-width="20" transform="rotate(45 240 180)"/>
+ <path d="M0 180L480 180" stroke="url(#grad)" stroke-width="20" transform="rotate(90 240 180)"/>
+ <path d="M410 10L70 350" stroke="url(#grad)" stroke-width="20"/>
+ <rect x="0" y="-60" width="480" height="480" fill="none" stroke="black"/>
+ </g>
+ <text x="350" y="250" text-anchor="middle">Without fallback</text>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.7 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <!--<g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-21-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-21-b-ref.png
new file mode 100644
index 0000000..207c6e7
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-21-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-21-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-21-b.svg
new file mode 100644
index 0000000..8024d52
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-21-b.svg
@@ -0,0 +1,146 @@
+<svg id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="AG" author="ED" status="accepted"
+ version="$Revision: 1.4 $" testname="$RCSfile: pservers-grad-21-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://www.w3.org/TR/SVG11/pservers.html#Gradients">
+ <p>
+ Test the inheritance of radial gradient attributes. The test has six ellipses with blue stroke, each
filled
+ with two gradients.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The test has passed if:
+ </p>
+ <ul>
+ <li>the gradient fills don't extend outside the blue ellipses</li>
+ <li>the gradient fills in the left column exactly match the corresponding reference gradient fills
in the right column</li>
+ </ul>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-21-b.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <radialGradient id="grad1" cx="100%" r="20%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad2" xlink:href="#grad1" cx="0%"/>
+ <radialGradient id="grad3" cx="100%" r="20%" fx="0%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad4" xlink:href="#grad3" cx="0%"/>
+ <radialGradient id="grad5" cx="100%" r="20%" fx="25%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad6" xlink:href="#grad5" cx="0%"/>
+
+ <radialGradient id="grad1-ref" cx="100%" r="20%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad2-ref" cx="0%" r="20%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad3-ref" cx="100%" r="20%" fx="0%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad4-ref" cx="0%" r="20%" fx="0%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad5-ref" cx="100%" r="20%" fx="25%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ <radialGradient id="grad6-ref" cx="0%" r="20%" fx="25%">
+ <stop offset="0" stop-color="black" />
+ <stop offset="1" stop-opacity="0"/>
+ </radialGradient>
+ </defs>
+
+ <g transform="translate(100 60)">
+ <!-- first line of tests -->
+ <rect fill="url(#grad1)" x="-60" width="120" height="90"/>
+ <rect fill="url(#grad2)" x="60" width="120" height="90"/>
+ <ellipse cx="60" cy="45" rx="24" ry="18" fill="none" stroke="blue"/>
+
+ <!-- reference for first line -->
+ <g transform="translate(100 0)">
+ <rect fill="url(#grad1-ref)" x="-60" width="120" height="90"/>
+ <rect fill="url(#grad2-ref)" x="60" width="120" height="90"/>
+ <ellipse cx="60" cy="45" rx="24" ry="18" fill="none" stroke="blue"/>
+ </g>
+
+ <!-- second line of tests -->
+ <g transform="translate(0 50)">
+ <rect fill="url(#grad3)" x="-60" width="120" height="90"/>
+ <rect fill="url(#grad4)" x="60" width="120" height="90"/>
+ <ellipse cx="60" cy="45" rx="24" ry="18" fill="none" stroke="blue"/>
+ </g>
+
+ <!-- reference for second line -->
+ <g transform="translate(100 50)">
+ <rect fill="url(#grad3-ref)" x="-60" width="120" height="90"/>
+ <rect fill="url(#grad4-ref)" x="60" width="120" height="90"/>
+ <ellipse cx="60" cy="45" rx="24" ry="18" fill="none" stroke="blue"/>
+ </g>
+
+ <!-- third line of tests -->
+ <g transform="translate(0 100)">
+ <rect fill="url(#grad5)" x="-60" width="120" height="90"/>
+ <rect fill="url(#grad6)" x="60" width="120" height="90"/>
+ <ellipse cx="60" cy="45" rx="24" ry="18" fill="none" stroke="blue"/>
+ </g>
+
+ <!-- reference for third line -->
+ <g transform="translate(100 100)">
+ <rect fill="url(#grad5-ref)" x="-60" width="120" height="90"/>
+ <rect fill="url(#grad6-ref)" x="60" width="120" height="90"/>
+ <ellipse cx="60" cy="45" rx="24" ry="18" fill="none" stroke="blue"/>
+ </g>
+
+ <rect x="120" y="20" width="80" height="200" fill="none" stroke="green"/>
+ <text y="200" x="160" text-anchor="middle" font-size="12">Reference</text>
+ </g>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved
+ <g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-22-b-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-22-b-ref.png
new file mode 100644
index 0000000..c1f0bf8
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-22-b-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-22-b.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-22-b.svg
new file mode 100644
index 0000000..b4289b6
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-22-b.svg
@@ -0,0 +1,97 @@
+<svg id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/"
+ template-version="1.4" reviewer="ED" author="AG" status="accepted"
+ version="$Revision: 1.4 $" testname="$RCSfile: pservers-grad-22-b.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://dev.w3.org/SVG/profiles/1.1F2/master/pservers.html#Gradients">
+ <p>
+ Tests that transforms affect the rendering of a gradient.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required.
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ The test passes if each of the two gradient-filled rectangles
+ towards the top of the test slide is identical to the one below it.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-22-b.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient id="g1" x1="0" y1="0" x2="400" y2="50" gradientUnits="userSpaceOnUse" >
+ <stop offset="0" stop-color="blue"/>
+ <stop offset="0.5" stop-color="yellow"/>
+ <stop offset="1.0" stop-color="blue"/>
+ </linearGradient>
+
+ <linearGradient id="g2" x1="0" y1="0" x2="200" y2="12.5" gradientUnits="userSpaceOnUse">
+ <stop offset="0" stop-color="blue"/>
+ <stop offset="0.5" stop-color="yellow"/>
+ <stop offset="1.0" stop-color="blue"/>
+ </linearGradient>
+
+ <linearGradient id="g3" x1="0" y1="0" x2="400" y2="50" gradientUnits="userSpaceOnUse"
gradientTransform="rotate(-37) scale(0.89 1)">
+ <stop offset="0" stop-color="blue"/>
+ <stop offset="0.5" stop-color="yellow"/>
+ <stop offset="1.0" stop-color="blue"/>
+ </linearGradient>
+
+ <linearGradient id="g4" x1="0" y1="0" x2="200" y2="12.5" gradientUnits="userSpaceOnUse"
gradientTransform="rotate(-20)">
+ <stop offset="0" stop-color="blue"/>
+ <stop offset="0.5" stop-color="yellow"/>
+ <stop offset="1.0" stop-color="blue"/>
+ </linearGradient>
+ </defs>
+
+ <g transform="translate(20,50)">
+ <g transform="scale(0.5,1)">
+ <rect width="400" height="50" fill="url(#g1)" />
+ </g>
+ </g>
+
+ <g transform="translate(20,120)">
+ <rect width="200" height="50" fill="url(#g2)" />
+ </g>
+
+ <g transform="translate(250,80)">
+ <rect width="400" height="50" fill="url(#g3)" transform="scale(0.5,1)"/>
+ </g>
+
+ <g transform="translate(250,150)">
+ <rect width="200" height="50" fill="url(#g4)" />
+ </g>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.4 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved
+ <g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>-->
+</svg>
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-23-f-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-23-f-ref.png
new file mode 100644
index 0000000..30710a6
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-23-f-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-23-f.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-23-f.svg
new file mode 100644
index 0000000..3029214
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-23-f.svg
@@ -0,0 +1,80 @@
+<svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= SVG 1.1 2nd Edition Test Case =-->
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4"
reviewer="[reviewer]" author="Microsoft" status="created" version="$Revision: 1.3 $" testname="$RCSfile:
pservers-grad-23-f.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://dev.w3.org/SVG/profiles/1.1F2/publish/pservers.html#Gradients">
+ <p>
+ <!--[[
+ Properties do not inherit from elements referencing 'linearGradient' or 'radialGradient' elements.
+ ]]-->
+ </p>
+ <p>
+ <!--[[
+ Specify a 'stop-color' attribute equal to 'red' on a 'g' element ancestor of a 'rect' element.
Specify a 'linearGradient' with a single
+ 'stop' that has a 'stop-color' of 'inherit'. Reference the 'linearGradient' from the 'rect' element
and verify that the 'rect' is not red.
+ Repeat the same process with a sibling 'rect' element referencing a 'radialGradient' element.
+ ]]-->
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Run the test. No interaction required
+ </p>
+ <p>
+ <!--[[
+
+ ]]-->
+ </p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ <!--[[
+ Test passes if there is no red visible on the page.
+ ]]-->
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-23-f.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-size="18">
+ <defs>
+ <linearGradient id="testLinear" stop-color="inherit">
+ <stop offset="100%" stop-color="inherit" />
+ </linearGradient>
+ <radialGradient id="testRadial" stop-color="inherit">
+ <stop offset="100%" stop-color="inherit" />
+ </radialGradient>
+ </defs>
+ <g stop-color="red">
+ <rect x="30" y="30" width="100" height="100" fill="url(#testLinear)" stop-color="inherit" />
+ <rect x="150" y="30" width="100" height="100" fill="url(#testRadial)" stop-color="inherit" />
+ </g>
+
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
\ No newline at end of file
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-24-f-ref.png
b/tests/fixtures/reftests/svg1.1/pservers-grad-24-f-ref.png
new file mode 100644
index 0000000..3797fe5
Binary files /dev/null and b/tests/fixtures/reftests/svg1.1/pservers-grad-24-f-ref.png differ
diff --git a/tests/fixtures/reftests/svg1.1/pservers-grad-24-f.svg
b/tests/fixtures/reftests/svg1.1/pservers-grad-24-f.svg
new file mode 100644
index 0000000..2aa0298
--- /dev/null
+++ b/tests/fixtures/reftests/svg1.1/pservers-grad-24-f.svg
@@ -0,0 +1,68 @@
+<svg id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
+ <!--======================================================================-->
+ <!--= Copyright 2008 World Wide Web Consortium, (Massachusetts =-->
+ <!--= Institute of Technology, European Research Consortium for =-->
+ <!--= Informatics and Mathematics (ERCIM), Keio University). =-->
+ <!--= All Rights Reserved. =-->
+ <!--= See http://www.w3.org/Consortium/Legal/. =-->
+ <!--======================================================================-->
+ <d:SVGTestCase xmlns:d="http://www.w3.org/2000/02/svg/testsuite/description/" template-version="1.4"
reviewer="CM" author="Microsoft" status="reviewed" version="$Revision: 1.3 $" testname="$RCSfile:
pservers-grad-24-f.svg,v $">
+ <d:testDescription xmlns="http://www.w3.org/1999/xhtml"
href="http://dev.w3.org/SVG/profiles/1.1F2/publish/pservers.html#Gradients">
+ <p>
+ Test that the 'linearGradient' and 'radialGradient' elements are neither rendered directly nor via
the 'use' element.
+ </p>
+ <p>
+ The test defines 'linearGradient' and 'radialGradient' elements with a red 'stop' and references
them from a 'use' element. 'linearGradient'
+ and 'radialGradient' elements with a red 'stop' are also specified outside of a 'defs' tag as if
they were regular graphical elements.
+ </p>
+ </d:testDescription>
+ <d:operatorScript xmlns="http://www.w3.org/1999/xhtml">
+ <p>Run the test. No interaction required.</p>
+ </d:operatorScript>
+ <d:passCriteria xmlns="http://www.w3.org/1999/xhtml">
+ <p>
+ Test passes if there is no red visible on the page.
+ </p>
+ </d:passCriteria>
+ </d:SVGTestCase>
+ <title id="test-title">$RCSfile: pservers-grad-24-f.svg,v $</title>
+ <defs>
+ <font-face
+ font-family="SVGFreeSansASCII"
+ unicode-range="U+0-7F">
+ <font-face-src>
+ <font-face-uri xlink:href="../resources/SVGFreeSans.svg#ascii"/>
+ </font-face-src>
+ </font-face>
+ </defs>
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+ <defs>
+ <linearGradient id="testLinear">
+ <stop offset="100%" stop-color="red" />
+ </linearGradient>
+ <radialGradient id="testRadial">
+ <stop offset="100%" stop-color="red" />
+ </radialGradient>
+ </defs>
+ <text x="10" y="50">There should be no red.</text>
+ <use x="0" y="0" xlink:href="url(#testLinear)" />
+ <use x="0" y="150" xlink:href="url(#testRadial)" />
+ <linearGradient x1="0" x2="100" y1="150" y2="250">
+ <stop offset="100%" stop-color="red" />
+ </linearGradient>
+ <radialGradient cx="200" cy="300" r="50" fx="200" fy="300">
+ <stop offset="100%" stop-color="red" />
+ </radialGradient>
+ </g>
+ <g font-family="SVGFreeSansASCII,sans-serif" font-size="32">
+ <text id="revision" x="10" y="340" stroke="none"
+ fill="black">$Revision: 1.3 $</text>
+ </g>
+ <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000"/>
+ <!-- comment out this watermark once the test is approved -->
+ <g id="draft-watermark">
+ <rect x="1" y="1" width="478" height="20" fill="red" stroke="black" stroke-width="1"/>
+ <text font-family="SVGFreeSansASCII,sans-serif" font-weight="bold" font-size="20" x="240"
+ text-anchor="middle" y="18" stroke-width="0.5" stroke="black" fill="white">DRAFT</text>
+ </g>
+</svg>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]