layout/reftests/svg/smil/anim-feFuncR-tableValues-01.svg

Thu, 15 Jan 2015 21:03:48 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:03:48 +0100
branch
TOR_BUG_9701
changeset 11
deefc01c0e14
permissions
-rw-r--r--

Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)

michael@0 1 <svg xmlns="http://www.w3.org/2000/svg"
michael@0 2 xmlns:xlink="http://www.w3.org/1999/xlink"
michael@0 3 class="reftest-wait"
michael@0 4 onload="setTimeAndSnapshot(1, true)">
michael@0 5 <title>Test animation of the &lt;number-list&gt; attribute on the 'text' element</title>
michael@0 6 <script xlink:href="smil-util.js" type="text/javascript"/>
michael@0 7
michael@0 8 <linearGradient id="gradient">
michael@0 9 <stop offset="0" stop-color="black" />
michael@0 10 <stop offset="100%" stop-color="red" />
michael@0 11 </linearGradient>
michael@0 12
michael@0 13 <!-- The difference between respective numbers in the effective 'from' and
michael@0 14 'to' lists below is carefully designed to be a factor of 3. That way
michael@0 15 our reference file (which checks against a one third complete animation)
michael@0 16 can contain whole numbers, which is necessary to avoid failure due to
michael@0 17 hard coded rounded numbers in the reference not matching platform
michael@0 18 specific rounding behaviour.
michael@0 19 -->
michael@0 20
michael@0 21
michael@0 22 <!-- Test calcMode="linear". -->
michael@0 23
michael@0 24 <filter id="f_calcMode_linear_to" x="0%" y="0%" width="100%" height="100%">
michael@0 25 <feComponentTransfer>
michael@0 26 <feFuncR type="table" tableValues="-1 3 3 -1">
michael@0 27
michael@0 28 <!-- At 1s the animVal should be "0 2 2 0". -->
michael@0 29 <animate attributeName="tableValues"
michael@0 30 calcMode="linear"
michael@0 31 begin="0s" dur="3s"
michael@0 32 to="2 0 0 2"
michael@0 33 fill="freeze"/>
michael@0 34
michael@0 35 </feFuncR>
michael@0 36 </feComponentTransfer>
michael@0 37 </filter>
michael@0 38 <rect x="20" y="20" width="256" height="20" fill="url(#gradient)"
michael@0 39 filter="url(#f_calcMode_linear_to)"/>
michael@0 40
michael@0 41
michael@0 42 <!-- Test 'by' animation. -->
michael@0 43
michael@0 44 <filter id="f_calcMode_linear_by" x="0%" y="0%" width="100%" height="100%">
michael@0 45 <feComponentTransfer>
michael@0 46 <feFuncR type="table" tableValues="-1 3 3 -1">
michael@0 47
michael@0 48 <!-- At 1s the animVal should be "0 2 2 0". -->
michael@0 49 <animate attributeName="tableValues"
michael@0 50 calcMode="linear"
michael@0 51 begin="0s" dur="3s"
michael@0 52 by="3 -3 -3 3"
michael@0 53 fill="freeze"/>
michael@0 54
michael@0 55 </feFuncR>
michael@0 56 </feComponentTransfer>
michael@0 57 </filter>
michael@0 58 <rect x="20" y="60" width="256" height="20" fill="url(#gradient)"
michael@0 59 filter="url(#f_calcMode_linear_by)"/>
michael@0 60
michael@0 61
michael@0 62 <!-- Test calcMode="paced". -->
michael@0 63
michael@0 64 <filter id="f_calcMode_paced" x="0%" y="0%" width="100%" height="100%">
michael@0 65 <feComponentTransfer>
michael@0 66 <feFuncR type="table" tableValues="-1 3 3 -1">
michael@0 67
michael@0 68 <!-- At 1s the animVal should be "0 2 2 0". -->
michael@0 69 <animate attributeName="tableValues"
michael@0 70 calcMode="paced"
michael@0 71 begin="0s" dur="3s"
michael@0 72 values="-1 3 3 -1; 1 1 1 1; 2 0 0 2"
michael@0 73 fill="freeze"/>
michael@0 74
michael@0 75 </feFuncR>
michael@0 76 </feComponentTransfer>
michael@0 77 </filter>
michael@0 78 <rect x="20" y="100" width="256" height="20" fill="url(#gradient)"
michael@0 79 filter="url(#f_calcMode_paced)"/>
michael@0 80
michael@0 81
michael@0 82 <!-- Test calcMode="discrete". -->
michael@0 83
michael@0 84 <filter id="f_calcMode_discrete" x="0%" y="0%" width="100%" height="100%">
michael@0 85 <feComponentTransfer>
michael@0 86 <feFuncR type="table" tableValues="0 0 0 0">
michael@0 87
michael@0 88 <!-- The value should be "0 2 2 0" from 1s onwards. -->
michael@0 89 <animate attributeName="tableValues"
michael@0 90 calcMode="discrete"
michael@0 91 begin="0s" dur="2s"
michael@0 92 to="0 2 2 0"
michael@0 93 fill="freeze"/>
michael@0 94
michael@0 95 </feFuncR>
michael@0 96 </feComponentTransfer>
michael@0 97 </filter>
michael@0 98 <rect x="20" y="140" width="256" height="20" fill="url(#gradient)"
michael@0 99 filter="url(#f_calcMode_discrete)"/>
michael@0 100
michael@0 101 </svg>

mercurial