svg-patternTransform-combination-001.html (1693B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Transforms Test: SVG patternTransform presentation attribute and translation-value argument with translateX applied twice</title> 5 <link rel="author" title="Rebecca Hauck" href="mailto:rhauck@adobe.com"> 6 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-transform"> 7 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#two-d-transform-functions"> 8 <link rel="match" href="reference/svg-patternTransform-combination-ref.html"> 9 <link rel="help" href="http://www.w3.org/TR/css-transforms-1/#svg-gradient-transform-pattern-transform"> 10 <meta name="flags" content="svg"> 11 <meta name="assert" content="The patternTransform attribute must support multiple transform functions the same element. The pattern in the test should be moved 50 pixels in the X direction resulting in a solid green rect."> 12 <style type="text/css"> 13 svg { 14 width: 200px; 15 height: 200px; 16 background:red; 17 } 18 </style> 19 </head> 20 <body> 21 <p>The test passes if there is a green square and no red.</p> 22 <svg> 23 <defs> 24 <pattern id="greenRects" patternUnits="userSpaceOnUse" x="0" y="0" width="100" height="100" patternTransform="translate(25 0) translate(25 0)"> 25 <rect x="0" y="0" width="50" height="50" fill="green"/> 26 <rect x="0" y="50" width="50" height="50" fill="green"/> 27 </pattern> 28 </defs> 29 <rect fill="green" x="0" y="0" width="50" height="200"/> 30 <rect fill="green" x="100" y="0" width="50" height="200"/> 31 <rect fill="url(#greenRects)" x="0" y="0" width="200" height="200"/> 32 </svg> 33 </body> 34 </html>