| <?xml version="1.0" encoding="UTF-8"?> |
| <!--======================================================================--> |
| <!--= 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/. =--> |
| <!--======================================================================--> |
| <!-- =====================================================================--> |
| <!-- --> |
| <!-- struct-image-06-t.svg --> |
| <!-- --> |
| <!-- Author : Vincent Hardy, 16-Oct-2003 --><!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="tiny" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360"> |
| <SVGTestCase xmlns:testcase="http://www.w3.org/2000/02/svg/testsuite/description/" xmlns="http://www.w3.org/2000/02/svg/testsuite/description/" reviewed="yes" reviewer="CN" owner="VH" desc="image preserveAspectRatio" status="accepted" issue="ISSUE-222" version="$Revision: 1.11 $" testname="$RCSfile: struct-image-06-t.svg,v $"> |
| <OperatorScript> |
| <Paragraph> |
| Check that all the preserveAspectRatio values are supported |
| for the <image> element. In particular, check that |
| values which are not supported on the svg element's |
| preserveAspectRatio are supported for <image>. |
| </Paragraph> |
| </OperatorScript> |
| </SVGTestCase> |
| <title id="test-title">struct-image-06-t.svg</title> |
| <desc id="test-desc">Tests proper handling of preserveAspectRatio |
| attributes on the <image> element</desc> |
| |
| <!--======================================================================--> |
| <!--Content of Test Case follows... =====================--> |
| <!--======================================================================--> |
| <g id="test-body-content"> |
| <g font-size="9"> |
| <desc>Example PreserveAspectRatio - demonstrate available options</desc> |
| <text x="10" y="30">SVG to fit</text> |
| <g transform="translate(20,40)"> |
| <image xlink:href="resources/smiley.png" width="50" height="50"/> |
| </g> |
| <text x="10" y="110">Viewport 1</text> |
| <g transform="translate(10,120)"> |
| <rect x=".5" y=".5" width="49" height="29" fill="none" stroke="blue"/> |
| </g> |
| <text x="10" y="180">Viewport 2</text> |
| <g transform="translate(20,190)"> |
| <rect x=".5" y=".5" width="29" height="59" fill="none" stroke="blue"/> |
| </g> |
| <g id="meet-group-1" transform="translate(100, 50)"> |
| <text x="0" y="-20">---------- meet ----------</text> |
| <g transform="translate(30,0)"> |
| <text y="-5">xMid*</text> |
| <rect x=".5" y=".5" width="49" height="29" fill="none" stroke="blue"/> |
| <image xlink:href="resources/smiley.png" preserveAspectRatio="xMidYMid meet" width="50" height="30"/> |
| </g> |
| </g> |
| <g id="meet-group-2" transform="translate(230, 50)"> |
| <text x="0" y="-20">---------- meet ----------</text> |
| <g transform="translate(30, 0)"> |
| <text y="-5">*YMid</text> |
| <rect x=".5" y=".5" width="29" height="59" fill="none" stroke="blue"/> |
| <image xlink:href="resources/smiley.png" preserveAspectRatio="xMidYMid meet" width="30" height="60"/> |
| </g> |
| </g> |
| <g id="meet-group-3" transform="translate(350, 50)"> |
| <text x="0" y="-20">---------- meet ----------</text> |
| <g transform="translate(30, 0)"> |
| <text y="-5">*none</text> |
| <rect x=".5" y=".5" width="29" height="59" fill="none" stroke="blue"/> |
| <image xlink:href="resources/smiley.png" preserveAspectRatio="none" width="30" height="60"/> |
| </g> |
| </g> |
| </g> |
| </g> |
| |
| <text id="revision" x="10" y="340" font-size="40" stroke="none" fill="black">$Revision: 1.11 $</text> |
| <rect id="test-frame" x="1" y="1" width="478" height="358" fill="none" stroke="#000000"/> |
| |
| </svg> |