| 1 |
<?xml version="1.0" standalone="no"?> |
| 2 |
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000802//EN" |
| 3 |
"http://www.w3.org/TR/2000/CR-SVG-20000802/DTD/svg-20000802.dtd"> |
| 4 |
|
| 5 |
<!-- |
| 6 |
|
| 7 |
Licensed to the Apache Software Foundation (ASF) under one or more |
| 8 |
contributor license agreements. See the NOTICE file distributed with |
| 9 |
this work for additional information regarding copyright ownership. |
| 10 |
The ASF licenses this file to You under the Apache License, Version 2.0 |
| 11 |
(the "License"); you may not use this file except in compliance with |
| 12 |
the License. You may obtain a copy of the License at |
| 13 |
|
| 14 |
http://www.apache.org/licenses/LICENSE-2.0 |
| 15 |
|
| 16 |
Unless required by applicable law or agreed to in writing, software |
| 17 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 18 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 |
See the License for the specific language governing permissions and |
| 20 |
limitations under the License. |
| 21 |
|
| 22 |
--> |
| 23 |
<!-- ====================================================================== --> |
| 24 |
<!-- Modification of a transform attribute --> |
| 25 |
<!-- --> |
| 26 |
<!-- @author [email protected] --> |
| 27 |
<!-- @version $Id$ --> |
| 28 |
<!-- ====================================================================== --> |
| 29 |
|
| 30 |
<?xml-stylesheet type="text/css" href="../../resources/style/test.css" ?> |
| 31 |
|
| 32 |
<svg id="body" width="450" height="500" viewBox="0 0 450 500"> |
| 33 |
<title>transform attribute in 'onload' (2)</title> |
| 34 |
|
| 35 |
<text x="50%" y="45" class="title">transform attributes in 'onload' (2)</text> |
| 36 |
|
| 37 |
<script type="text/ecmascript"> |
| 38 |
|
| 39 |
function transform(evt, transform) { |
| 40 |
var elt = evt.target; |
| 41 |
elt.setAttribute("transform", transform) |
| 42 |
} |
| 43 |
|
| 44 |
</script> |
| 45 |
|
| 46 |
<g id="test-content" > |
| 47 |
<g onload="transform(evt, 'translate(175, 150)')"> |
| 48 |
<rect x="0" y="0" width="50" height="50" style="fill:crimson" /> |
| 49 |
<rect x="50" y="0" width="50" height="50" style="fill:gold" /> |
| 50 |
<rect x="0" y="50" width="50" height="50" style="fill:orange" /> |
| 51 |
<rect x="50" y="50" width="50" height="50" style="fill:#eee" /> |
| 52 |
</g> |
| 53 |
|
| 54 |
<g onload="transform(evt, 'translate(175, 320) rotate(45 50 50)')"> |
| 55 |
<rect x="0" y="0" width="50" height="50" style="fill:crimson" /> |
| 56 |
<rect x="50" y="0" width="50" height="50" style="fill:gold" /> |
| 57 |
<rect x="0" y="50" width="50" height="50" style="fill:orange" /> |
| 58 |
<rect x="50" y="50" width="50" height="50" style="fill:#eee" /> |
| 59 |
</g> |
| 60 |
|
| 61 |
<g style="fill:none; stroke:black"> |
| 62 |
|
| 63 |
<g transform="translate(175, 150)" style="stroke:black; fill:none"> |
| 64 |
<rect x="0" y="0" width="50" height="50" /> |
| 65 |
<rect x="50" y="0" width="50" height="50" /> |
| 66 |
<rect x="0" y="50" width="50" height="50" /> |
| 67 |
<rect x="50" y="50" width="50" height="50" /> |
| 68 |
</g> |
| 69 |
|
| 70 |
<g transform="translate(175, 320) rotate(45 50 50)"> |
| 71 |
<rect x="0" y="0" width="50" height="50" /> |
| 72 |
<rect x="50" y="0" width="50" height="50" /> |
| 73 |
<rect x="0" y="50" width="50" height="50" /> |
| 74 |
<rect x="50" y="50" width="50" height="50" /> |
| 75 |
</g> |
| 76 |
|
| 77 |
</g> |
| 78 |
|
| 79 |
</g> |
| 80 |
|
| 81 |
</svg> |