[lasem] tests: more test in the suite.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] tests: more test in the suite.
- Date: Sat, 27 Oct 2012 10:11:28 +0000 (UTC)
commit e475f1bb3a378b6da018a633e699640159390f09
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sat Oct 27 12:11:09 2012 +0200
tests: more test in the suite.
tests/data/svg/suite/colors/color-syntax-ref.png | Bin 0 -> 4720 bytes
tests/data/svg/suite/colors/color-syntax.svg | 98 +++++++++++++++++
tests/data/svg/suite/colors/colors-ref.png | Bin 0 -> 1253 bytes
tests/data/svg/suite/colors/colors.svg | 64 +++++++++++
tests/data/svg/suite/{fill => colors}/hsl-ref.png | Bin 251 -> 251 bytes
tests/data/svg/suite/{fill => colors}/hsl.svg | 0
.../svg/suite/masks/clip-path-and-mask-ref.png | Bin 0 -> 1667 bytes
tests/data/svg/suite/masks/clip-path-and-mask.svg | 69 ++++++++++++
tests/data/svg/suite/masks/clip-path-units-ref.png | Bin 0 -> 375 bytes
tests/data/svg/suite/masks/clip-path-units.svg | 79 ++++++++++++++
tests/data/svg/suite/masks/clip-rule-ref.png | Bin 0 -> 558 bytes
tests/data/svg/suite/masks/clip-rule.svg | 59 ++++++++++
tests/data/svg/suite/opacity/group-opacity-ref.png | Bin 0 -> 942 bytes
tests/data/svg/suite/opacity/group-opacity.svg | 112 ++++++++++++++++++++
tests/data/svg/suite/opacity/opacity-ref.png | Bin 1106 -> 738 bytes
tests/data/svg/suite/opacity/opacity.svg | 5 +-
16 files changed, 484 insertions(+), 2 deletions(-)
---
diff --git a/tests/data/svg/suite/colors/color-syntax-ref.png b/tests/data/svg/suite/colors/color-syntax-ref.png
new file mode 100644
index 0000000..e8392b3
Binary files /dev/null and b/tests/data/svg/suite/colors/color-syntax-ref.png differ
diff --git a/tests/data/svg/suite/colors/color-syntax.svg b/tests/data/svg/suite/colors/color-syntax.svg
new file mode 100644
index 0000000..6df6779
--- /dev/null
+++ b/tests/data/svg/suite/colors/color-syntax.svg
@@ -0,0 +1,98 @@
+ï<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- color-datatypes-BE-01.svg -->
+<!-- renamed for 1.1 suite to color-prop-02-f.svg -->
+<!-- -->
+<!-- Author : Chris Lilley, 12-Aug-2000 -->
+<!-- 1.1 revision by Rick Graham -->
+<!-- Revised for SVGT/B: Benoit Bezaire Jul/02/2002 -->
+<!-- More revision CL -->
+<!--======================================================================-->
+<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100" height="100" viewBox="0 0 480 360">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.6 $" testname="color-prop-02-f.svg">
+ <Paragraph>
+ Purpose of test is to determine if the color datatype is supported. There are multiple syntaxes for
+ specifying the same color, such as #37F and #3377FF. For each of the nine groups shown here,
+ each of the shapes in the group uses one of the syntactical forms and all in the group should
+ be identical in color. This test is focussed on the X11 color names, which are not part of the tiny profile.
+ </Paragraph>
+ <Paragraph>
+ Each group uses four forms - 6-digit hex, rbg() integer form, rgb() percentage form,
+ and named ('X11') colors. It does not use 3-digit hex, because the colors used in this test
+ cannot be represented in three digit form.</Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">color-prop-02-f.svg</title>
+ <desc id="test-desc">Test that viewer has the basic capability to render X11colors, using any of the equivalent forms.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <!-- groups of five colors -->
+ <g>
+ <circle cx="75" cy="40" r="20" fill="crimson"/>
+ <circle cx="115" cy="40" r="20" fill="#DC143C"/>
+ <circle cx="75" cy="80" r="20" fill="rgb(220,20,60)"/>
+ <circle cx="115" cy="80" r="20" fill="rgb(86.274509803921568627450980392157%,7.8431372549019607843137254901961%,23.529411764705882352941176470588%)"/>
+ </g>
+ <g>
+ <circle cx="200" cy="40" r="20" fill="palegreen"/>
+ <circle cx="240" cy="40" r="20" fill="#98FB98"/>
+ <circle cx="200" cy="80" r="20" fill="rgb(152, 251, 152)"/>
+ <circle cx="240" cy="80" r="20" fill="rgb(59.60784313725490196078431372549%,98.431372549019607843137254901961%,59.60784313725490196078431372549%)"/>
+ </g>
+ <g>
+ <circle cx="325" cy="40" r="20" fill="royalblue"/>
+ <circle cx="365" cy="40" r="20" fill="#4169E1"/>
+ <circle cx="325" cy="80" r="20" fill="rgb(65, 105, 225)"/>
+ <circle cx="365" cy="80" r="20" fill="rgb(25.490196078431372549019607843137%,41.176470588235294117647058823529%,88.235294117647058823529411764706%)"/>
+ </g>
+ <g>
+ <circle cx="75" cy="135" r="20" fill="firebrick"/>
+ <circle cx="115" cy="135" r="20" fill="#B22222"/>
+ <circle cx="75" cy="175" r="20" fill="rgb(178,34,34)"/>
+ <circle cx="115" cy="175" r="20" fill="rgb(69.803921568627450980392156862745%,13.333333333333333333333333333333%,13.333333333333333333333333333333%)"/>
+ </g>
+ <g>
+ <circle cx="200" cy="135" r="20" fill="seagreen"/>
+ <circle cx="240" cy="135" r="20" fill="#2E8B57"/>
+ <circle cx="200" cy="175" r="20" fill="rgb(46, 139, 87)"/>
+ <circle cx="240" cy="175" r="20" fill="rgb(18.039215686274509803921568627451%,54.509803921568627450980392156863%,34.117647058823529411764705882353%)"/>
+ </g>
+ <g>
+ <circle cx="325" cy="135" r="20" fill="mediumblue"/>
+ <circle cx="365" cy="135" r="20" fill="#0000CD"/>
+ <circle cx="325" cy="175" r="20" fill="rgb(0, 0, 205)"/>
+ <circle cx="365" cy="175" r="20" fill="rgb(0%,0%,80.39215686274509803921568627451%)"/>
+ </g>
+ <g>
+ <circle cx="75" cy="230" r="20" fill="indianred"/>
+ <circle cx="115" cy="230" r="20" fill="#CD5C5C"/>
+ <circle cx="75" cy="270" r="20" fill="rgb(205, 92, 92)"/>
+ <circle cx="115" cy="270" r="20" fill="rgb(80.39215686274509803921568627451%,36.078431372549019607843137254902%,36.078431372549019607843137254902%)"/>
+ </g>
+ <g>
+ <circle cx="200" cy="230" r="20" fill="lawngreen"/>
+ <circle cx="240" cy="230" r="20" fill="#7CFC00"/>
+ <circle cx="200" cy="270" r="20" fill="rgb(124, 252, 0)"/>
+ <circle cx="240" cy="270" r="20" fill="rgb(48.627450980392156862745098039216%,98.823529411764705882352941176471%,0%)"/>
+ </g>
+ <g>
+ <circle cx="325" cy="230" r="20" fill="mediumturquoise"/>
+ <circle cx="365" cy="230" r="20" fill="#48D1CC"/>
+ <circle cx="325" cy="270" r="20" fill="rgb(72, 209, 204)"/>
+ <circle cx="365" cy="270" r="20" fill="rgb(28.235294117647058823529411764706%,81.960784313725490196078431372549%,80%)"/>
+ </g>
+ </g>
+<!-- <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.6 $</text>-->
+<!-- <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>-->
+</svg>
diff --git a/tests/data/svg/suite/colors/colors-ref.png b/tests/data/svg/suite/colors/colors-ref.png
new file mode 100644
index 0000000..f5c43df
Binary files /dev/null and b/tests/data/svg/suite/colors/colors-ref.png differ
diff --git a/tests/data/svg/suite/colors/colors.svg b/tests/data/svg/suite/colors/colors.svg
new file mode 100644
index 0000000..d49fdd8
--- /dev/null
+++ b/tests/data/svg/suite/colors/colors.svg
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- color-property-BE-02.svg -->
+<!-- renamed for SVGT/B to color-prop-01-b.svg -->
+<!-- Author : Chris Lilley, 28-Jul-2000 -->
+<!-- Revised for SVGT/B: Benoit Bezaire Jul/02/2002 -->
+<!--======================================================================-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="basic" id="svg-root" width="100" height="100" viewBox="0 0 480 360">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.4 $" testname="color-prop-01-b.svg">
+ <Paragraph>
+ The purpose of this test is to determine if an application has the basic capability to process
+ the 'color' property. There are three subtests.
+ </Paragraph>
+ <Paragraph>
+ The first subtest, to the top left, is passed if the circle has a red fill. The second subtest,
+ to the top right, is passed if the circle has a red stroke. The third subtest shows a rectangle
+ with a gradient fill, which has three stops. The subtest is passed if central stop is red,
+ fading off to blue to the left and pale yellow to the right.
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">color-prop-01-b</title>
+ <desc id="test-desc">Test that viewer has the basic capability to process the color property</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <defs>
+ <linearGradient id="grad" color="red">
+ <stop offset="5%" stop-color="#60F"/>
+ <stop offset="50%" stop-color="currentColor"/>
+ <stop offset="95%" stop-color="#FF6"/>
+ </linearGradient>
+ </defs>
+ <g color="red">
+ <g color="inherit" fill="none" stroke="none">
+ <!-- inherit to check the property value, not the string, is being used -->
+ <circle cx="130" cy="80" r="60" fill="currentColor"/>
+ <circle cx="350" cy="80" r="60" stroke="currentColor" stroke-width="4"/>
+ </g>
+ </g>
+ <g color="blue">
+ <g color="inherit" fill="none" stroke="none">
+ <!-- blue color used to check color being scoped and inherited correctly -->
+ <rect x="60" y="215" width="360" height="80" fill="url(#grad)"/>
+ </g>
+ </g>
+<!-- <g font-size="30" fill="black">-->
+<!-- <text x="120" y="170">fill</text>-->
+<!-- <text x="310" y="170">stroke</text>-->
+<!-- <text x="180" y="205">stop-color</text>-->
+<!-- </g>-->
+ </g>
+<!-- <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.4 $</text>-->
+<!-- <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>-->
+</svg>
diff --git a/tests/data/svg/suite/fill/hsl-ref.png b/tests/data/svg/suite/colors/hsl-ref.png
similarity index 100%
rename from tests/data/svg/suite/fill/hsl-ref.png
rename to tests/data/svg/suite/colors/hsl-ref.png
diff --git a/tests/data/svg/suite/fill/hsl.svg b/tests/data/svg/suite/colors/hsl.svg
similarity index 100%
rename from tests/data/svg/suite/fill/hsl.svg
rename to tests/data/svg/suite/colors/hsl.svg
diff --git a/tests/data/svg/suite/masks/clip-path-and-mask-ref.png b/tests/data/svg/suite/masks/clip-path-and-mask-ref.png
new file mode 100644
index 0000000..635be60
Binary files /dev/null and b/tests/data/svg/suite/masks/clip-path-and-mask-ref.png differ
diff --git a/tests/data/svg/suite/masks/clip-path-and-mask.svg b/tests/data/svg/suite/masks/clip-path-and-mask.svg
new file mode 100644
index 0000000..d155765
--- /dev/null
+++ b/tests/data/svg/suite/masks/clip-path-and-mask.svg
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" id="svg-root" width="100" height="100" viewBox="0 0 480 360">
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- masking-mask-04-f.svg -->
+<!-- -->
+<!-- Tests the impact of strokes within clipPath and mask -->
+<!-- -->
+<!-- Author : Corel SVG Viewer QA team 01-05-2003 -->
+<!-- Revised by: Benoit Bezaire -->
+<!-- -->
+<!--======================================================================-->
+
+ <SVGTestCase
+ xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/"
+ xmlns="http://www.w3.org/2000/02/svg/testsuite/description/"
+ owner="BB" reviewer="CL" desc="Tests the impact of strokes within
+ clipPath and mask" status="accepted" version="$Revision: 1.7 $" testname="$RCSfile: masking-intro-01-f.svg,v $">
+ <OperatorScript>
+ <Paragraph>The rules are different regarding the geometry of a shape when clipping and masking.
+ For example, a clip-path does not take into account the stroke of the shape used for clipping.
+ It is however, used when masking.
+ </Paragraph>
+ <Paragraph>The UA should render at the top of the illustration, two identical darkblue circles.
+ Below those two cicles, two more circles should appear. They are of lighter appearance,
+ the one on the left has a darker and thick stroke.
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+
+ <title id="test-title">masking-mask-04-f.svg</title>
+ <desc id="test-desc">Tests the impact of strokes within clipPath and mask</desc>
+
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+<!-- <text font-size="18" x="240" y="35" text-anchor="middle">Testing stroke inclusion for 'clip-path' and 'mask'</text>-->
+
+ <defs>
+ <clipPath id="one" clipPathUnits="objectBoundingBox">
+ <circle cx="0.3" cy="0.5" r="0.2" stroke-width="0.15" fill="none" stroke="red"/>
+ <circle cx="0.7" cy="0.5" r="0.2" stroke-width="0.15" fill="none" stroke="none"/>
+ </clipPath>
+ </defs>
+
+ <rect x="150" y="0" width="200" height="200" fill="darkblue" clip-path="url(#one)"/>
+<!-- <text x="50" y="110">With a 'clip-path':</text>-->
+
+ <defs>
+ <mask id="two" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox">
+ <circle cx="0.3" cy="0.5" r="0.2" stroke-width="0.15" fill="blue" stroke="red"/>
+ <circle cx="0.7" cy="0.5" r="0.2" stroke-width="0.15" fill="blue" stroke="none"/>
+ </mask>
+ </defs>
+
+ <rect x="150" y="150" width="200" height="200" fill="darkblue" mask="url(#two)"/>
+<!-- <text x="50" y="260">With a 'mask':</text>-->
+
+
+<!-- <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.7 $</text>-->
+<!-- <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>-->
+</svg>
diff --git a/tests/data/svg/suite/masks/clip-path-units-ref.png b/tests/data/svg/suite/masks/clip-path-units-ref.png
new file mode 100644
index 0000000..d321948
Binary files /dev/null and b/tests/data/svg/suite/masks/clip-path-units-ref.png differ
diff --git a/tests/data/svg/suite/masks/clip-path-units.svg b/tests/data/svg/suite/masks/clip-path-units.svg
new file mode 100644
index 0000000..8223c19
--- /dev/null
+++ b/tests/data/svg/suite/masks/clip-path-units.svg
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- =====================================================================-->
+<!-- -->
+<!-- masking-clipPath-BE-02.svg -->
+<!-- renamed for 1.1 suite to masking-path-02-b.svg -->
+<!-- -->
+<!-- Test to see if clipPathUnits attribute is handled properly on a -->
+<!-- clipPath element. Only tests the userSpaceOnUse and -->
+<!-- objectBoundingBox items of the clipPathUnits. userSpace has been -->
+<!-- tested by the previous test as it is the default. -->
+<!-- -->
+<!-- Author : Haroon Sheikh 10-Mar-2000 -->
+<!-- Revised for 1.1 : Jun Fujisawa 19-Feb-2002 -->
+<!-- -->
+<!-- History: -->
+<!-- 10-Mar-2000, HSS: Serial#1 created. -->
+<!-- 17-Mar-2000, LH=" fix BE" fix Legend; ser#2. -->
+<!-- 27-Apr-2000, LH=" fix missing "#" on url(clip2)" ser#3. -->
+<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
+<!-- 16-Aug-2000, LH="rename" ser#4. -->
+<!-- -->
+<!-- =====================================================================-->
+<!--======================================================================-->
+<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
+<!--= log messages, and therefore is no longer in the preceding preamble.=-->
+<!--======================================================================-->
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" viewBox="0 0 480 360" width="100" height="100" version="1.1" baseProfile="basic">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.4 $" testname="masking-path-02-b.svg">
+ <Paragraph>
+ Test to see if clipPathUnits attribute is handled properly on a
+ clipPath element. Only tests the userSpaceOnUse and
+ objectBoundingBox items of the clipPathUnits. userSpace has been
+ tested by the previous test as it is the default.
+ </Paragraph>
+ <Paragraph>
+ The test at the top shows a red rectangle that has been clipped by a
+ rectangular clipping path. The clipping path is defined using clipPathUnits=objectBoundingBox.
+ Only the bottom-right portion of the red rectangle should be visible.
+ </Paragraph>
+ <Paragraph>
+ The example at the bottom a rotated blue rectangle that has been clipped by a
+ rectangular clipping path. The clipping path is defined using clipPathUnits=userSpaceOnUse.
+ As a result only the bottom-right portion of the rectangle should be visible.
+ </Paragraph>
+ <Paragraph>
+ The rendered picture should match the reference image exactly, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">masking-path-02-b</title>
+ <desc id="test-desc">Test to see if clipPathUnits attribute is handled properly on a clipPath element. Only tests the userSpaceOnUse and objectBoundingBox items of the clipPathUnits. userSpace has been tested by the previous test as it is the default.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+ <clipPath id="clip1" clipPathUnits="objectBoundingBox">
+ <rect x=".25" y=".5" width=".6" height="1"/>
+ </clipPath>
+ <rect x="10" y="10" width="430" height="80" fill="red" clip-path="url(#clip1)"/>
+<!-- <text font-family="Arial" font-size="30" x="20" y="130">clipPathUnits=objectBoundingBox</text>-->
+ <clipPath id="clip2" clipPathUnits="userSpaceOnUse">
+ <rect x="60" y="60" width="80" height="80"/>
+ </clipPath>
+ <rect transform="translate(100 200) rotate(-45)" x="0" y="0" width="120" height="120" fill="blue" clip-path="url(#clip2)" />
+<!-- <text font-family="Arial" font-size="30" x="20" y="280">clipPathUnits=userSpaceOnUse</text>-->
+ </g>
+<!-- <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.4 $</text>-->
+<!-- <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>-->
+</svg>
diff --git a/tests/data/svg/suite/masks/clip-rule-ref.png b/tests/data/svg/suite/masks/clip-rule-ref.png
new file mode 100644
index 0000000..93aa95a
Binary files /dev/null and b/tests/data/svg/suite/masks/clip-rule-ref.png differ
diff --git a/tests/data/svg/suite/masks/clip-rule.svg b/tests/data/svg/suite/masks/clip-rule.svg
new file mode 100644
index 0000000..6d4a91e
--- /dev/null
+++ b/tests/data/svg/suite/masks/clip-rule.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- masking-clipRule-BE-03.svg -->
+<!-- renamed for 1.1 suite to masking-path-05-f.svg -->
+<!-- Author : Haroon Sheikh 10-Mar-2000 -->
+<!-- 1.1 revision by Charles Ying -->
+<!-- further revision by CL -->
+<!--======================================================================-->
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100" height="100" viewBox="0 0 480 360">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.2 $" testname="masking-path-05-f.svg">
+ <Paragraph>
+ Test to see if clip-rule property has been implemented properly.
+ </Paragraph>
+ <Paragraph>
+ The test at the top shows a red rectangle that has been clipped by a
+ clipping path that overlaps itself. The clip-rule is defined to be evenodd
+ so the overlap should have a hole in it.
+ </Paragraph>
+ <Paragraph>
+ The test at the bottom shows a blue rectangle that has been clipped by a
+ clipping path that overlaps itself. The clip-rule is defined to be nonzero
+ so the overlap should be filled.
+ </Paragraph>
+ <Paragraph>
+ The rendered picture should match the reference image exactly, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">masking-path-05-f</title>
+ <desc id="test-desc">Test to see if clip-rule property has been implemented properly.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+<!-- <text font-family="Arial" font-size="14" x="150" y="20">Test for clip-rule property.</text>-->
+ <clipPath id="clip1">
+ <path clip-rule="evenodd" d="M200,40l20,0 0,60 20,0 0,-20 -60,0 0,-20 80,0 0,60 -60,0 0,-80z"/>
+ </clipPath>
+ <rect x="50" y="30" width="350" height="100" fill="red" clip-path="url(#clip1)"/>
+<!-- <text font-family="Arial" font-size="12" x="100" y="140">clip-rule=evenodd</text>-->
+ <clipPath id="clip2">
+ <path clip-rule="nonzero" d="M200,170l20,0 0,60 20,0 0,-20 -60,0 0,-20 80,0 0,60 -60,0 0,-80z"/>
+ </clipPath>
+ <rect x="50" y="160" width="350" height="100" fill="blue" clip-path="url(#clip2)"/>
+<!-- <text font-family="Arial" font-size="12" x="100" y="270">cliprule=nonzero</text>-->
+ </g>
+<!-- <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.2 $</text>-->
+<!-- <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>-->
+</svg>
diff --git a/tests/data/svg/suite/opacity/group-opacity-ref.png b/tests/data/svg/suite/opacity/group-opacity-ref.png
new file mode 100644
index 0000000..2c4939a
Binary files /dev/null and b/tests/data/svg/suite/opacity/group-opacity-ref.png differ
diff --git a/tests/data/svg/suite/opacity/group-opacity.svg b/tests/data/svg/suite/opacity/group-opacity.svg
new file mode 100644
index 0000000..1c86d11
--- /dev/null
+++ b/tests/data/svg/suite/opacity/group-opacity.svg
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
+
+<!--======================================================================-->
+<!--= Copyright 2000 World Wide Web Consortium, (Massachusetts =-->
+<!--= Institute of Technology, Institut National de Recherche en =-->
+<!--= Informatique et en Automatique, Keio University). All Rights =-->
+<!--= Reserved. See http://www.w3.org/Consortium/Legal/. =-->
+<!--======================================================================-->
+<!-- ===================================================================== -->
+<!-- -->
+<!-- masking-groupOpac-BE-04.svg -->
+<!-- renamed for 1.1 suite to masking-opacity-01-b.svg -->
+<!-- -->
+<!-- Test to see the effect of applying an opacity property to a group. -->
+<!-- -->
+<!-- Author : Haroon Sheikh 10-Mar-2000 -->
+<!-- 1.1 revision by Charles Ying -->
+<!-- -->
+<!-- History: -->
+<!-- 10-Mar-2000, HSS: Serial#1 created. -->
+<!-- 17-Mar-2000, LH=" fix BE" fix Legend; ser#2. -->
+<!-- 25-Apr-2000, LH: to ser#3, reflecting fix to PNG. -->
+<!-- 03-Aug-2000, LH=" update DOCTYPE for CR DTD, 20000802" ser# . -->
+<!-- 16-Aug-2000, LH="rename" ser#4. -->
+<!-- -->
+<!-- ===================================================================== -->
+<!--======================================================================-->
+<!--= Note. After October 2000, revision history is kept as CVS 'commit' =-->
+<!--= log messages, and therefore is no longer in the preceding preamble.=-->
+<!--======================================================================-->
+<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100" height="200" viewBox="0 0 240 360">
+ <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/">
+ <OperatorScript version="$Revision: 1.6 $" testname="masking-opacity-01-b.svg">
+ <Paragraph>
+ Test to see the effect of applying an opacity property to a group.
+ </Paragraph>
+ <Paragraph>
+ A blue rectangle with a green rectangle on top are contained in a
+ group. This opacity of the group and the opacity of the rectangles are
+ changed in this test. A red rectangle is provided in the background so
+ that opacity changes are obvious visually.
+ </Paragraph>
+ <Paragraph>
+ From top to bottom, the tests are as follows.
+ </Paragraph>
+ <Paragraph>
+ In the top test, the opacities of the group and the individual rectangles are
+ all set to 1. As a result, the green rectangle should appear on top of the blue
+ rectangle.
+ </Paragraph>
+ <Paragraph>
+ In the second test, the group is given an opacity of 0.5. As a result, the blue
+ rectangle should not show through in the region where the green and blue overlap.
+ </Paragraph>
+ <Paragraph>
+ In the third test, the group maintains a group opacity of 1 whereas each individual
+ rectangle is given an opacity of 0.5 in the group. As a result, the blue rectangle
+ should show through in the overlap region.
+ </Paragraph>
+ <Paragraph>
+ Lastly, the group and individual rectangles are all given an opacity of 0.5. The
+ result should be similar to the previous test only fainter (because the opacity) is
+ resulting in less contribution.
+ </Paragraph>
+ <Paragraph>
+ The rendered picture should match the reference image exactly, except for possible
+ variations in the labelling text (per CSS2 rules).
+ </Paragraph>
+ </OperatorScript>
+ </SVGTestCase>
+ <title id="test-title">masking-opacity-01-b</title>
+ <desc id="test-desc">Test to see the effect of applying an opacity property to a group.</desc>
+ <!--======================================================================-->
+ <!--Content of Test Case follows... =====================-->
+ <!--======================================================================-->
+ <g id="test-body-content">
+<!-- <text font-family="Arial" font-size="24" x="50" y="27">Test for opacity property on a group.</text>-->
+ <rect x="10" y="30" width="100" height="260" fill="red" />
+ <g opacity="1" >
+ <rect x="60" y="50" width="80" height="40" fill="blue" />
+ <rect x="70" y="60" width="80" height="40" fill="lime" />
+ </g>
+<!-- <text font-family="Arial" font-size="20" x="200" y="62">Group opacity: 1</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="80">Blue rectangle opacity: 1</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="98">Green rectangle opacity: 1</text>-->
+ <g opacity="0.5" >
+ <rect x="60" y="110" width="80" height="40" fill="blue" />
+ <rect x="70" y="120" width="80" height="40" fill="lime" />
+ </g>
+<!-- <text font-family="Arial" font-size="20" x="200" y="122">Group opacity: 0.5</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="140">Blue rectangle opacity: 1</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="158">Green rectangle opacity: 1</text>-->
+ <g opacity="1" >
+ <rect x="60" y="170" width="80" height="40" fill="blue" opacity=".5" />
+ <rect x="70" y="180" width="80" height="40" fill="lime" opacity=".5" />
+ </g>
+<!-- <text font-family="Arial" font-size="20" x="200" y="182">Group opacity: 1</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="200">Blue rectangle opacity: 0.5</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="218">Green rectangle opacity: 0.5</text>-->
+ <g opacity="0.5" >
+ <rect x="60" y="230" width="80" height="40" fill="blue" opacity=".5" />
+ <rect x="70" y="240" width="80" height="40" fill="lime" opacity=".5" />
+ </g>
+<!-- <text font-family="Arial" font-size="20" x="200" y="242">Group opacity: 0.5</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="260">Blue rectangle opacity: 0.5</text>-->
+<!-- <text font-family="Arial" font-size="20" x="200" y="278">Green rectangle opacity: 0.5</text>-->
+ </g>
+<!-- <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.6 $</text>-->
+<!-- <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/>-->
+</svg>
+
diff --git a/tests/data/svg/suite/opacity/opacity-ref.png b/tests/data/svg/suite/opacity/opacity-ref.png
index 575920d..f0980af 100644
Binary files a/tests/data/svg/suite/opacity/opacity-ref.png and b/tests/data/svg/suite/opacity/opacity-ref.png differ
diff --git a/tests/data/svg/suite/opacity/opacity.svg b/tests/data/svg/suite/opacity/opacity.svg
index c234af2..822c3e1 100644
--- a/tests/data/svg/suite/opacity/opacity.svg
+++ b/tests/data/svg/suite/opacity/opacity.svg
@@ -4,8 +4,9 @@
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
- width="200"
- height="200"
+ width="100"
+ height="100"
+ viewBox="0 0 200 200"
id="svg2">
<defs
id="defs4" />
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]