mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-05 15:01:01 +00:00
138 lines
7.3 KiB
HTML
Executable file
138 lines
7.3 KiB
HTML
Executable file
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
<meta name="keywords" content="W3C SVG 1.1 Test Suite testsuite mobile"/>
|
|
<meta name="description" content="W3C SVG 1.2 Tiny Test Suite"/>
|
|
<title>
|
|
SVG 1.2 Tiny test:animate-elem-82-t </title>
|
|
<style type="text/css">
|
|
<!--
|
|
.bodytext { font-family:verdana, helvetica, sans-serif; font-size: 12pt; line-height: 125%; text-align: Left; margin-top: 0; margin-bottom: 0 }
|
|
.pageTitle { line-height: 150%; font-size: 20pt; font-weight : 900; margin-bottom: 20pt }
|
|
.pageSubTitle { color : blue; line-height: 100%; font-size: 24pt; font-weight : 900 }
|
|
.openChapter { color : blue; line-height: 125%; font-weight : 900 }
|
|
.openSection { color : blue; line-height: 125%; font-weight : 900 }
|
|
.info { color : black; line-height: 110%; font-size: 10pt; font-weight : 100 }
|
|
p { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0 }
|
|
blockquote { margin-top:0; margin-bottom:0; padding-top:0; padding-bottom:0 }
|
|
.opscript {margin-left: 3%; margin-right: 3%; }
|
|
.opscript p { margin-top: 0.7em}
|
|
.navbar {background: black; color: white; font-weight: bold}
|
|
-->
|
|
</style>
|
|
</head>
|
|
<body class="bodytext">
|
|
|
|
<div class="linkbar">
|
|
<p>
|
|
<a href="animate-elem-82-t.html">Tiny version</a></p>
|
|
<p>Specification link: <a target="spec" href="http://www.w3.org/TR/SVGMobile12/animate.html">16.2 Animation elements</a></p>
|
|
<p>
|
|
<a href="animate-elem-81-t.html">animate-elem-81-t ←</a>
|
|
<a href="index.html">index</a>
|
|
<a href="animate-elem-83-t.html">→ animate-elem-83-t</a>
|
|
</p></div>
|
|
|
|
<table align="center" border="0" cellspacing="0" cellpadding="10">
|
|
<tr>
|
|
<td align="center" colspan="3">
|
|
<table border="0" cellpadding="8">
|
|
<tr>
|
|
<td align="center" colspan="2" class="pageTitle">
|
|
<h1>animate-elem-82-t</h1>
|
|
</td>
|
|
</tr>
|
|
<tr class="navbar">
|
|
<td align="center">
|
|
SVG Image
|
|
</td>
|
|
<td align="center">
|
|
PNG Image
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="right">
|
|
<object data="../svggen/animate-elem-82-t.svg" width="480" height="360" type="image/svg+xml"><p style="font-size:300%;color:red">FAIL</p></object>
|
|
</td>
|
|
<td align="left">
|
|
<img alt="raster image of animate-elem-82-t" src="../png/animate-elem-82-t.png" width="480" height="360"/>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
|
|
<div class="opscript">
|
|
<p>
|
|
This test demonstrates validates the operation of animateTransform with regards to the rotation center and with
|
|
regards to paced animation.
|
|
</p>
|
|
<p>
|
|
The following descriptions describe the various animations, going top bottom, left to right. For each animation,
|
|
orange rectangle markers show the expected position for the animated rectangle halfway through the animation. The
|
|
markers are drawn with a thick stroke for 0.2s, starting at the time when they reflect the expected position.
|
|
</p>
|
|
<p>
|
|
The first animateTransform has type='rotate' and goes from 45 degrees to 90 degrees over a period of 3s. The
|
|
rotation center for the from and to values is 0, 0. At 0 seconds, the expected transform should be rotate(45). At
|
|
1.5 seconds, the expected transform is rotate(0.5 * (90 + 45)) = rotate(67.5). At 3s, the expected transform is
|
|
rotate(90).
|
|
</p>
|
|
<p>
|
|
The second animateTransform has type='rotate' but has a rotation center that varies between the from and to
|
|
values. The rotation goes from rotate(45,0,0) to rotate(90,-15,-15). At 0s, the expected transform is
|
|
rotate(45,0,0). At 1.5s, the expected transform is rotate(67.5, -7.5, -7.5). At 3s, the expected transform is
|
|
rotate(90, -15, -15).
|
|
</p>
|
|
<p>
|
|
The third animateTransform has type='translate' and calcMode='paced'. The animation goes from translate(-40,40)
|
|
to translate(-20,20) to translate(40,-40). At 0s, the expected transform is translate(-40,40). At 1.5s, the
|
|
expected transform is translate(0,0). At 3s, the expected transform is translate(40,-40).
|
|
</p>
|
|
<p>
|
|
The fourth animateTransform has type='translate' and calcMode='linear'. The animation goes from translate(-40,40)
|
|
to translate(-20,-20) to translate(40,-40). At 0s, the expected transform is translate(-40,40). At 1.5s, the
|
|
expected transform is translate(-20,-20). At 3s, the expected transform is translate(40,-40).
|
|
</p>
|
|
<p>
|
|
The fifth animateTransform has type='scale' and calcMode='paced'. The animation goes from scale(1,2) to scale(3,2)
|
|
to scale(1,1). The total length along the sx component is 2 + 2 = 4. The total length along the sy component is
|
|
0 + 1 = 1. At 0s, the expected transform is scale(1,2). At 1.5s, the expected transform is scale(3,1.5) so that a
|
|
length of 2 has been run on the sx component and a length of 0.5 has been run on the sy component. At 3s, the
|
|
expected transform is scale(3,2).
|
|
</p>
|
|
<p>
|
|
The sixth animateTransform has type='scale' and calcMode='linear'. The animation goes from scale(1,2) to scale(3,2)
|
|
to scale(1,1). At 0s, the expected transform is scale(1,2). At 1.5s, the expected transform is scale(3,2). At 3s,
|
|
the expected transform is scale(1,1).
|
|
</p>
|
|
<p>
|
|
The seventh animateTransform has type="rotate" and calcMode='paced'. The animation goes from rotate(0,0,0) to
|
|
rotate(45,-15,-20) to rotate(180,30,50). The total length along the rotation angle component is
|
|
(45 - 0) + (180 - 45) = 180. The total length along the rotation center along the x axis is
|
|
(0 - (-15)) + (30 - (-15)) = 45 + 15 = 60. The total length along the rotation center along the y axis is
|
|
(0 - (-20)) + (50 - (-20)) = 20 + 70 = 90. At 0s, the expected transform is rotate(45,-15,-20). At 1.5s, the
|
|
expected transform is rotate(90,0,5) to achieve constant velocity along the rotation angle component, the x-axis
|
|
rotation center component and the y-axis rotation center component. At 1.5s, half the distance has been run on
|
|
each component. For the rotation angle, this means that 45 has been reached and that 45 more degrees in the
|
|
(45 <= r < 180) interval have been consumed. For the x-axis rotation center, this means that 30 units have
|
|
been run: the (0 >= x > -15) interval has been fully consumed (15 units long) and 15 units on the
|
|
(-15 <= x < 30) interval have been consumed, which explains the computed 0 value. For the y-axis rotation
|
|
center, this means that 45 units have been run: the (0 >= y > -20) interval has been fully consumed and 25
|
|
units have been consumed in the (-20 <= y < 50) interval, which explains the computed 5 value. At 3s, the
|
|
expected transform is rotate(180,30,50).
|
|
</p>
|
|
|
|
</div>
|
|
<div class="linkbar"> <p>
|
|
<a href="animate-elem-81-t.html">animate-elem-81-t ←</a>
|
|
<a href="index.html">index</a>
|
|
<a href="animate-elem-83-t.html">→ animate-elem-83-t</a>
|
|
</p></div>
|
|
</body>
|
|
</html>
|