| <?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, 2002 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/. =--> |
| <!--======================================================================--> |
| <!--======================================================================--> |
| <!-- --> |
| <!-- filters-fldMrgOff-BE-15.svg --> |
| <!-- renamed for 1.1 suite to filters-offset-01-f.svg --> |
| <!-- renamed for SVGT/B to filters-offset-01-b.svg --> |
| <!-- --> |
| <!-- Test which verifies the basic facilities of feFlood, feMerge, --> |
| <!-- and feOffset. --> |
| <!-- --> |
| <!-- Author : Peter Graffagnino 15-Aug-2000, Thomas DeWeese 5-Feb-2002 --> |
| <!-- 1.1 revision by Thomas DeWeese 5-Feb-2002 --> |
| <!-- Revised for SVGT/B: Benoit Bezaire Jul/08/2002 --> |
| <!-- --> |
| <!-- History: --> |
| <!-- 15-Aug-2000, pgraff created. --> |
| <!-- --> |
| <!--======================================================================--> |
| <!--======================================================================--> |
| <!--= Note. After October 2000, revision history is kept as CVS 'commit' =--> |
| <!--= log messages, and therefore is no longer in the preceding preamble.=--> |
| <!--======================================================================--> |
| |
| <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" version="1.1" baseProfile="basic"> |
| <SVGTestCase xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" > |
| <OperatorScript version="$Revision: 1.3 $" testname="filters-offset-01-b.svg"> |
| <Paragraph> |
| The target crosshairs should align with |
| lower left bounds of the associated circle. |
| The color of each crosshair should match |
| the associated circle. |
| </Paragraph> |
| <Paragraph> |
| Verify the basic capability to handle the feOffset, feMerge and |
| feFlood filter nodes. Four copies of a filled circle should appear at |
| various offsets and colors. For each circle a reference crosshair is |
| drawn at the lower left of the circle to indicate the expected color, |
| opacity and position for the filtered element. The targets are drawn |
| with the standard svg path element. |
| </Paragraph> |
| <Paragraph> |
| The rendered image should match the reference image. Additionally, the |
| target crosshairs should match the color, lower left corner, and |
| opacity of each copy of the filtered circle. |
| </Paragraph> |
| <Paragraph> |
| In addition to feFlood, feMerge, and feOffset, this test uses |
| 'feComposite' to recolor the SourceGraphic with the feFlood color. |
| The source graphic uses 'circle'. The target cross hairs are drawn |
| with 'path' and use 'fill' and 'fill-opacity'. |
| </Paragraph> |
| </OperatorScript> |
| </SVGTestCase> |
| <title id="test-title">filters-offset-01-b</title> |
| <desc id="test-desc">Test which verifies the basic facilities of feFlood, feMerge, and feOffset.</desc> |
| <!--===============================================================--> |
| <!--Content of Test Case follows... ==============--> |
| <!--===============================================================--> |
| <g id="test-body-content"> |
| <defs> |
| <filter id="FOMTest" filterUnits="objectBoundingBox" |
| x="0" y="0" width="2.5" height="4"> |
| |
| <feOffset result="Off1" dx="40" dy="30"/> |
| <feFlood result="F1" flood-color="#408000" flood-opacity=".8" /> |
| <feComposite in2="Off1" operator="in" result="C1"/> |
| |
| <feOffset in="SourceGraphic" result="Off2" dx="80" dy="60"/> |
| <feFlood result="F2" flood-color="#408000" flood-opacity=".6" /> |
| <feComposite in2="Off2" operator="in" result="C2"/> |
| |
| <feOffset in="SourceGraphic" result="Off3" dx="120" dy="90"/> |
| <feFlood result="F3" flood-color="#408000" flood-opacity=".4" /> |
| <feComposite in2="Off3" operator="in" result="C3"/> |
| |
| <feMerge> |
| <feMergeNode in="C3"/> |
| <feMergeNode in="C2"/> |
| <feMergeNode in="C1"/> |
| <feMergeNode in="SourceGraphic"/> |
| </feMerge> |
| </filter> |
| </defs> |
| |
| <circle cx="160" cy="50" r="40" fill="#000" |
| filter="url(#FOMTest)"/> |
| |
| <!-- Add some crosshairs of the same color of the |
| flood at the same location as the offset --> |
| |
| <!-- 20 pixel cross hair at 120,90 --> |
| <path fill="#000" transform="translate(120, 90)" |
| d="M-1,-11h2v10h10v2h-10v10h-2v-10h-10v-2h10v-10"/> |
| |
| <!-- 20 pixel cross hair at 160,120 --> |
| <path fill="#408000" fill-opacity=".8" transform="translate(160, 120)" |
| d="M-1,-11h2v10h10v2h-10v10h-2v-10h-10v-2h10v-10"/> |
| |
| <!-- 20 pixel cross hair at 200,150 --> |
| <path fill="#408000" fill-opacity=".6" transform="translate(200, 150)" |
| d="M-1,-11h2v10h10v2h-10v10h-2v-10h-10v-2h10v-10"/> |
| |
| <!-- 20 pixel cross hair at 240,180 --> |
| <path fill="#408000" fill-opacity=".4" transform="translate(240, 180)" |
| d="M-1,-11h2v10h10v2h-10v10h-2v-10h-10v-2h10v-10"/> |
| |
| </g> |
| |
| <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.3 $</text> |
| <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| </svg> |
| |