[kune-commits] r1692 - in trunk/docs: . tutorials

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Feb 22 02:51:24 CET 2012


Author: vjrj_
Date: 2012-02-22 02:51:24 +0100 (Wed, 22 Feb 2012)
New Revision: 1692

Added:
   trunk/docs/tutorials/
   trunk/docs/tutorials/docs.svg
   trunk/docs/tutorials/lang.js
Log:
svg tool tutorials

Added: trunk/docs/tutorials/docs.svg
===================================================================
--- trunk/docs/tutorials/docs.svg	                        (rev 0)
+++ trunk/docs/tutorials/docs.svg	2012-02-22 01:51:24 UTC (rev 1692)
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:ns1="http://sozi.baierouge.fr"
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="210mm"
+   height="297mm"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.2 r9819"
+   sodipodi:docname="docs.svg">
+  <!-- Start kune i18n part -->
+  <script
+     id="kunelangtable">
+    var idLangList = [
+    {id: &quot;layer2&quot;, layer: &quot;es&quot;},
+    {id: &quot;layer3&quot;, layer: &quot;en&quot;},
+    {id: &quot;layer4&quot;, layer: &quot;fr&quot;}
+    ];
+  </script>
+  <script xlink:href="lang.js" id="kunelang" />
+  <!-- End kune i18n part -->
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="2.8796948"
+     inkscape:cx="63.9286"
+     inkscape:cy="1076.99"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer4"
+     showgrid="true"
+     inkscape:window-width="1078"
+     inkscape:window-height="919"
+     inkscape:window-x="0"
+     inkscape:window-y="972"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid3100" />
+  </sodipodi:namedview>
+  <defs
+     id="defs4" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     style="display:inline"
+     inkscape:label="Capa 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <path
+       style="fill:#231f20"
+       d="m 42.01,12.423183 -22.016,0 0,32.023001 c 13,0 19,0 32,0 l 0,-22.015 z m 5.984,28.023001 c -10.90757,0 -10.78344,0 -24,0 0,0 0.006,-21.441 0.006,-24.084001 2.1,0 7.807,0 12.006,0 l 0,12.010001 12.01,0 c -10e-4,2.733 -0.022,12.074 -0.022,12.074 z m -7.984,-16.078 c 0,-1.543 0,-5.918 0,-8.006001 1.615,1.619001 6.402,6.404001 8.006,8.006001 -2.047,0 -6.454,0 -8.006,0 z"
+       id="path3"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccccccccccccccc" />
+    <path
+       sodipodi:nodetypes="ccccccccccccccccc"
+       inkscape:connector-curvature="0"
+       id="path3175"
+       d="m 91.004,48.423183 -22.016,0 0,32.023001 c 13,0 19,0 32,0 l 0,-22.015 z m 5.984,28.023001 c -10.90757,0 -10.78344,0 -24,0 0,0 0.006,-21.441 0.006,-24.084001 2.1,0 7.807,0 12.006,0 l 0,12.010001 12.01,0 c -0.001,2.733 -0.022,12.074 -0.022,12.074 z m -7.984,-16.078 c 0,-1.543 0,-5.918 0,-8.006001 1.615,1.619001 6.402,6.404001 8.006,8.006001 -2.047,0 -6.454,0 -8.006,0 z"
+       style="fill:#231f20" />
+    <rect
+       style="opacity:0.5;fill:none;stroke:#008080;stroke-width:0.66635472;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       id="rect3001"
+       width="56.241726"
+       height="67.671463"
+       x="5"
+       y="-2.6378174" />
+    <rect
+       y="35.362183"
+       x="56"
+       height="67.671463"
+       width="56.241726"
+       id="rect3276"
+       style="opacity:1;fill:none;stroke:#008080;stroke-width:0.66635471999999996;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"
+       ry="17" />
+  </g>
+  <g
+     style="display:none"
+     inkscape:label="es"
+     id="layer2"
+     inkscape:groupmode="layer">
+    <text
+       sodipodi:linespacing="125%"
+       id="text3119"
+       y="7.3621826"
+       x="10"
+       style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:0.5;color:#000000;fill:#782121;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:24;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
+       xml:space="preserve"><tspan
+         y="7.3621826"
+         x="10"
+         id="tspan3121"
+         sodipodi:role="line">es</tspan></text>
+  </g>
+  <g
+     style="display:none"
+     inkscape:label="en"
+     id="layer3"
+     inkscape:groupmode="layer">
+    <text
+       sodipodi:linespacing="125%"
+       id="text3124"
+       y="7.3621826"
+       x="25"
+       style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:0.5;color:#000000;fill:#782121;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:24;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold"
+       xml:space="preserve"><tspan
+         y="7.3621826"
+         x="25"
+         id="tspan3126"
+         sodipodi:role="line">en</tspan></text>
+  </g>
+  <g
+     style="display:none"
+     inkscape:label="fr"
+     id="layer4"
+     inkscape:groupmode="layer">
+    <path
+       inkscape:connector-curvature="0"
+       id="text3129"
+       d="m 50.948,-0.63782138 c 0.537205,-0.0046 1.070215,0.114515 1.572,0.3 -0.116,0.476 -0.232,0.952 -0.348,1.42799998 C 51.613058,0.87912662 50.921322,0.73761062 50.380998,1.0721886 49.966084,1.3666146 49.997619,1.9100776 50,2.3621826 c 0.736,0 1.472,0 2.208,0 0,0.496 0,0.992 0,1.488 -0.736,0 -1.472,0 -2.208,0 0,1.608 0,3.216 0,4.824 -0.596,0 -1.192,0 -1.788,0 0.0039,-2.290989 -0.0079,-4.582254 0.006,-6.873068 0.01855,-0.94143498 0.550605,-1.91820198 1.475506,-2.23572098 0.399242,-0.151413 0.829593,-0.202827 1.254482,-0.20321 z m 6.1305,4.58399998 c -0.655876,-0.17256 -1.349659,-0.27002 -2.016,-0.096 0,1.608 0,3.216 0,4.824 -0.596,0 -1.192,0 -1.788,0 0,-1.992 0,-3.984 0,-5.976 1.230297,-0.427964 2.573771,-0.627408 3.854248,-0.304497 0.365762,-0.02758 0.195311,0.276744 0.166469,0.486252 -0.07224,0.355415 -0.144478,0.71083 -0.216717,1.066245 z"
+       style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:125%;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;opacity:0.5;color:#000000;fill:#782121;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:24;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Ubuntu;-inkscape-font-specification:Ubuntu Bold" />
+  </g>
+  <script
+     id="sozi-script"
+     ns1:version="11.11-07001323">var sozi=sozi||{};(function(){var a=sozi.events=sozi.events||{},b={};a.listen=function(d,e){var c=b[d];if(!c){c=b[d]=[]}c.push(e)};a.fire=function(g){var d=b[g],c,f,e=Array.prototype.slice.call(arguments,1);if(d){c=d.length;for(f=0;f&lt;c;f+=1){d[f].apply(null,e)}}}}());var sozi=sozi||{};(function(){var w=sozi.framelist=sozi.framelist||{},k=this,r=k.document,q,m,c,j=0,d=5,i,u,b,y,z,v,f=300,g=&quot;decelerate&quot;,a=&quot;http://www.w3.org/2000/svg&quot;;function h(A){return function(B){sozi.player.previewFrame(A);B.stopPropagation()}}function l(A){A.stopPropagation()}function p(B){var A=B.relatedTarget;while(A!==m&amp;&amp;A!==q){A=A.parentNode}if(A===q){w.hide();sozi.player.restart();B.stopPropagation()}}function t(B){var A=c.getCTM().f;if(A&lt;=-k.innerHeight/2){A+=k.innerHeight/2}else{if(A&lt;0){A=0}}c.setAttribute(&quot;transform&quot;,&quot;translate(0,&quot;+A+&quot;)&quot;);B.stopPropagation()}function e(B){var A=c.getCTM().f;if(A+j&gt;=k.innerHeight*3/2){A-=k.innerHeight/2}else{if(A+j&gt;k.innerHeight+2*d){A=k.innerHeight-j-4*d}}c.setAttribute(&quot;transform&quot;,&quot;translate(0,&quot;+A+&quot;)&quot;);B.stopPropagation()}function s(A){var C=sozi.animation.profiles[g](A),B=1-C;z=y*C+b*B;m.setAttribute(&quot;transform&quot;,&quot;translate(&quot;+z+&quot;,0)&quot;)}function x(){}function o(){var G=r.createElementNS(a,&quot;rect&quot;),A=r.createElementNS(a,&quot;path&quot;),E=r.createElementNS(a,&quot;path&quot;),H=0,F,C=sozi.document.frames.length,B=sozi.location.getFrameIndex(),D,I;q=r.documentElement;m=r.createElementNS(a,&quot;g&quot;);m.setAttribute(&quot;id&quot;,&quot;sozi-toc&quot;);q.appendChild(m);c=r.createElementNS(a,&quot;g&quot;);m.appendChild(c);G.setAttribute(&quot;id&quot;,&quot;sozi-toc-background&quot;);G.setAttribute(&quot;x&quot;,d);G.setAttribute(&quot;y&quot;,d);G.setAttribute(&quot;rx&quot;,d);G.setAttribute(&quot;ry&quot;,d);G.addEventListener(&quot;click&quot;,l,false);G.addEventListener(&quot;mousedown&quot;,l,false);G.addEventListener(&quot;mouseout&quot;,p,false);c.appendChild(G);for(D=0;D&lt;C;D+=1){I=r.createElementNS(a,&quot;text&quot;);I.appendChild(r.createTextNode(sozi.document.frames[D].title));c.appendChild(I);if(D===B){I.setAttribute(&quot;class&quot;,&quot;sozi-toc-current&quot;)}F=I.getBBox().width;j+=I.getBBox().height;if(F&gt;H){H=F}I.setAttribute(&quot;x&quot;,2*d);I.setAttribute(&quot;y&quot;,j+d);I.addEventListener(&quot;click&quot;,h(D),false);I.addEventListener(&quot;mousedown&quot;,l,false)}A.setAttribute(&quot;class&quot;,&quot;sozi-toc-arrow&quot;);A.setAttribute(&quot;d&quot;,&quot;M&quot;+(H+3*d)+&quot;,&quot;+(5*d)+&quot; l&quot;+(4*d)+&quot;,0 l-&quot;+(2*d)+&quot;,-&quot;+(3*d)+&quot; z&quot;);A.addEventListener(&quot;click&quot;,t,false);A.addEventListener(&quot;mousedown&quot;,l,false);m.appendChild(A);E.setAttribute(&quot;class&quot;,&quot;sozi-toc-arrow&quot;);E.setAttribute(&quot;d&quot;,&quot;M&quot;+(H+3*d)+&quot;,&quot;+(7*d)+&quot; l&quot;+(4*d)+&quot;,0 l-&quot;+(2*d)+&quot;,&quot;+(3*d)+&quot; z&quot;);E.addEventListener(&quot;click&quot;,e,false);E.addEventListener(&quot;mousedown&quot;,l,false);m.appendChild(E);G.setAttribute(&quot;width&quot;,H+7*d);G.setAttribute(&quot;height&quot;,j+2*d);i=-H-9*d;u=0;z=y=i;m.setAttribute(&quot;transform&quot;,&quot;translate(&quot;+i+&quot;,0)&quot;);v=new sozi.animation.Animator(s,x)}function n(A){var D=r.getElementsByClassName(&quot;sozi-toc-current&quot;),C=c.getElementsByTagName(&quot;text&quot;),B;for(B=0;B&lt;D.length;B+=1){D[B].removeAttribute(&quot;class&quot;)}C[A].setAttribute(&quot;class&quot;,&quot;sozi-toc-current&quot;)}w.show=function(){b=z;y=u;v.start(f)};w.hide=function(){b=z;y=i;v.start(f)};w.isVisible=function(){return y===u};sozi.events.listen(&quot;displayready&quot;,o);sozi.events.listen(&quot;cleanup&quot;,w.hide);sozi.events.listen(&quot;framechange&quot;,n)}());var sozi=sozi||{};(function(){var t=sozi.player=sozi.player||{},u=sozi.display=sozi.display||{},j=this,o=j.document,p=0,v=1,s=1.05,x=5,c=false,l=false,g=0,e=0;function a(A,z,B){t.stop();u.zoom(A&gt;0?s:1/s,z,B)}function w(y){t.stop();u.rotate(y&gt;0?x:-x)}function r(){if(sozi.framelist.isVisible()){sozi.framelist.hide();t.restart()}else{t.stop();sozi.framelist.show()}}function i(y){if(y.button===p){c=true;l=false;g=y.clientX;e=y.clientY}else{if(y.button===v){r()}}y.stopPropagation()}function m(y){if(c){t.stop();l=true;sozi.events.fire(&quot;cleanup&quot;);u.drag(y.clientX-g,y.clientY-e);g=y.clientX;e=y.clientY}y.stopPropagation()}function f(y){if(y.button===p){c=false}y.stopPropagation()}function q(y){t.moveToPrevious();y.stopPropagation();y.preventDefault()}function h(y){if(!l&amp;&amp;y.button!==v){t.moveToNext()}y.stopPropagation()}function k(y){var z=0;if(!y){y=j.event}if(y.wheelDelta){z=y.wheelDelta;if(j.opera){z=-z}}else{if(y.detail){z=-y.detail}}if(z!==0){if(y.shiftKey){w(z)}else{a(z,y.clientX,y.clientY)}}y.stopPropagation();y.preventDefault()}function n(y){switch(y.charCode){case 43:a(1,j.innerWidth/2,j.innerHeight/2);break;case 45:a(-1,j.innerWidth/2,j.innerHeight/2);break;case 61:t.moveToCurrent();break;case 70:case 102:t.showAll();break;case 84:case 116:r();break;case 82:w(-1);break;case 114:w(1);break}y.stopPropagation()}function d(y){switch(y.keyCode){case 36:t.moveToFirst();break;case 35:t.moveToLast();break;case 38:t.jumpToPrevious();break;case 33:case 37:t.moveToPrevious();break;case 40:t.jumpToNext();break;case 34:case 39:case 13:case 32:t.moveToNext();break}y.stopPropagation()}function b(){confLang();var y=o.documentElement;y.addEventListener(&quot;click&quot;,h,false);y.addEventListener(&quot;mousedown&quot;,i,false);y.addEventListener(&quot;mouseup&quot;,f,false);y.addEventListener(&quot;mousemove&quot;,m,false);y.addEventListener(&quot;keypress&quot;,n,false);y.addEventListener(&quot;keydown&quot;,d,false);y.addEventListener(&quot;contextmenu&quot;,q,false);y.addEventListener(&quot;DOMMouseScroll&quot;,k,false);j.onmousewheel=k}j.addEventListener(&quot;load&quot;,b,false)}());var sozi=sozi||{};(function(){var e=sozi.animation=sozi.animation||{},h=this,j=40,d=[],b,i=h.mozRequestAnimationFrame||h.webkitRequestAnimationFrame||h.msRequestAnimationFrame||h.oRequestAnimationFrame;function c(){if(i){i(f)}else{b=h.setInterval(function(){f(Date.now())},j)}}function f(l){var k;if(d.length&gt;0){if(i){i(f)}for(k=0;k&lt;d.length;k+=1){d[k].step(l)}}else{if(!i){h.clearInterval(b)}}}function a(k){d.push(k);if(d.length===1){c()}}function g(k){d.splice(d.indexOf(k),1)}e.Animator=function(k,l){this.onStep=k;this.onDone=l;this.durationMs=0;this.data={};this.initialTime=0;this.started=false};e.Animator.prototype.start=function(k,l){this.durationMs=k;this.data=l;this.initialTime=Date.now();this.onStep(0,this.data);if(!this.started){this.started=true;a(this)}};e.Animator.prototype.stop=function(){if(this.started){g(this);this.started=false}};e.Animator.prototype.step=function(l){var k=l-this.initialTime;if(k&gt;=this.durationMs){this.stop();this.onStep(1,this.data);this.onDone()}else{this.onStep(k/this.durationMs,this.data)}};e.profiles={linear:function(k){return k},accelerate:function(k){return Math.pow(k,3)},&quot;strong-accelerate&quot;:function(k){return Math.pow(k,5)},decelerate:function(k){return 1-Math.pow(1-k,3)},&quot;strong-decelerate&quot;:function(k){return 1-Math.pow(1-k,5)},&quot;accelerate-decelerate&quot;:function(k){var l=k&lt;=0.5?k:1-k,m=Math.pow(2*l,3)/2;return k&lt;=0.5?m:1-m},&quot;strong-accelerate-decelerate&quot;:function(k){var l=k&lt;=0.5?k:1-k,m=Math.pow(2*l,5)/2;return k&lt;=0.5?m:1-m},&quot;decelerate-accelerate&quot;:function(k){var l=k&lt;=0.5?k:1-k,m=(1-Math.pow(1-2*l,2))/2;return k&lt;=0.5?m:1-m},&quot;strong-decelerate-accelerate&quot;:function(k){var l=k&lt;=0.5?k:1-k,m=(1-Math.pow(1-2*l,3))/2;return k&lt;=0.5?m:1-m}}}());var sozi=sozi||{};(function(){var d=sozi.player=sozi.player||{},j=sozi.display=sozi.display||{},h=this,c,k,e=500,q=-10,l=&quot;linear&quot;,g=0,n=0,o=false,p=false;function f(t,w){var v=1-t,u=w.profile(t),s=1-u,r,x;for(r in w.initialState){if(w.initialState.hasOwnProperty(r)){if(typeof w.initialState[r]===&quot;number&quot;&amp;&amp;typeof w.finalState[r]===&quot;number&quot;){j.geometry[r]=w.finalState[r]*u+w.initialState[r]*s}}}if(w.zoomWidth&amp;&amp;w.zoomWidth.k!==0){x=t-w.zoomWidth.ts;j.geometry.width=w.zoomWidth.k*x*x+w.zoomWidth.ss}if(w.zoomHeight&amp;&amp;w.zoomHeight.k!==0){x=t-w.zoomHeight.ts;j.geometry.height=w.zoomHeight.k*x*x+w.zoomHeight.ss}j.clip=w.finalState.clip;j.update()}function i(){var r;if(sozi.document.frames[n].timeoutEnable){p=true;r=(n+1)%sozi.document.frames.length;k=h.setTimeout(function(){d.moveToFrame(r)},sozi.document.frames[n].timeoutMs)}}function m(){g=n;if(o){i()}}d.startFromIndex=function(r){o=true;p=false;g=r;n=r;j.showFrame(sozi.document.frames[r]);i()};d.restart=function(){d.startFromIndex(n)};d.stop=function(){c.stop();if(p){h.clearTimeout(k);p=false}o=false;g=n};function b(r,B,z){var C={ss:((r&lt;0)?Math.max(B,z):Math.min(B,z))*(100-r)/100,ts:0.5,k:0},x,w,t,s,A,y;if(r!==0){x=B-z;w=B-C.ss;t=z-C.ss;if(x!==0){s=Math.sqrt(w*t);A=(w-s)/x;y=(w+s)/x;C.ts=(A&gt;0&amp;&amp;A&lt;=1)?A:y}C.k=w/C.ts/C.ts}return C}d.jumpToFrame=function(r){d.stop();sozi.events.fire(&quot;cleanup&quot;);g=r;n=r;j.showFrame(sozi.document.frames[r]);sozi.events.fire(&quot;framechange&quot;,r)};d.previewFrame=function(s){var u=sozi.document.frames[s].geometry,r,t;if(q!==0){r=b(q,j.geometry.width,u.width);t=b(q,j.geometry.height,u.height)}n=s;c.start(e,{initialState:j.getCurrentGeometry(),finalState:u,profile:sozi.animation.profiles[l],zoomWidth:r,zoomHeight:t});sozi.events.fire(&quot;framechange&quot;,s)};d.moveToFrame=function(t){var s=e,w=q,u=sozi.animation.profiles[l],r,v;if(p){h.clearTimeout(k);p=false}if(t===(n+1)%sozi.document.frames.length){s=sozi.document.frames[t].transitionDurationMs;w=sozi.document.frames[t].transitionZoomPercent;u=sozi.document.frames[t].transitionProfile}sozi.events.fire(&quot;cleanup&quot;);if(w!==0){r=b(w,j.geometry.width,sozi.document.frames[t].geometry.width);v=b(w,j.geometry.height,sozi.document.frames[t].geometry.height)}o=true;n=t;c.start(s,{initialState:j.getCurrentGeometry(),finalState:sozi.document.frames[n].geometry,profile:u,zoomWidth:r,zoomHeight:v});sozi.events.fire(&quot;framechange&quot;,t)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var r=n;if(!c.started||g&lt;=n){r-=1}if(r&gt;=0){d.jumpToFrame(r)}};d.moveToPrevious=function(){var r=n,s;for(r-=1;r&gt;=0;r-=1){s=sozi.document.frames[r];if(!s.timeoutEnable||s.timeoutMs!==0){d.moveToFrame(r);break}}};d.jumpToNext=function(){var r=n;if(!c.started||g&gt;=n){r+=1}if(r&lt;sozi.document.frames.length){d.jumpToFrame(r)}};d.moveToNext=function(){if(n&lt;sozi.document.frames.length-1||sozi.document.frames[n].timeoutEnable){d.moveToFrame((n+1)%sozi.document.frames.length)}};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(n)};d.showAll=function(){d.stop();sozi.events.fire(&quot;cleanup&quot;);c.start(e,{initialState:j.getCurrentGeometry(),finalState:j.getDocumentGeometry(),profile:sozi.animation.profiles[l]})};function a(){d.startFromIndex(sozi.location.getFrameIndex())}c=new sozi.animation.Animator(f,m);sozi.events.listen(&quot;displayready&quot;,a)}());var sozi=sozi||{};(function(){var d=sozi.display=sozi.display||{},h=this,i=h.document,j,c,k,a,g=&quot;http://www.w3.org/2000/svg&quot;;d.geometry={cx:0,cy:0,width:1,height:1,rotate:0,clip:true};function f(){var o,l=i.createElementNS(g,&quot;g&quot;),m=i.createElementNS(g,&quot;clipPath&quot;);j=i.documentElement;k=j.getBBox();a=i.createElementNS(g,&quot;g&quot;);while(true){o=j.firstChild;if(!o){break}j.removeChild(o);a.appendChild(o)}c=i.createElementNS(g,&quot;rect&quot;);c.setAttribute(&quot;id&quot;,&quot;sozi-clip-rect&quot;);m.setAttribute(&quot;id&quot;,&quot;sozi-clip-path&quot;);m.appendChild(c);j.appendChild(m);l.setAttribute(&quot;clip-path&quot;,&quot;url(#sozi-clip-path)&quot;);l.appendChild(a);j.appendChild(l);j.setAttribute(&quot;width&quot;,h.innerWidth);j.setAttribute(&quot;height&quot;,h.innerHeight);sozi.events.fire(&quot;displayready&quot;)}function b(){j.setAttribute(&quot;width&quot;,h.innerWidth);j.setAttribute(&quot;height&quot;,h.innerHeight);d.update()}function e(){var l={};l.scale=Math.min(h.innerWidth/d.geometry.width,h.innerHeight/d.geometry.height);l.width=d.geometry.width*l.scale;l.height=d.geometry.height*l.scale;l.x=(h.innerWidth-l.width)/2;l.y=(h.innerHeight-l.height)/2;return l}d.getElementGeometry=function(l){var s,p,t,n,q,o,r=l.getCTM(),m=Math.sqrt(r.a*r.a+r.b*r.b);if(l.nodeName===&quot;rect&quot;){s=l.x.baseVal.value;p=l.y.baseVal.value;t=l.width.baseVal.value;n=l.height.baseVal.value}else{q=l.getBBox();s=q.x;p=q.y;t=q.width;n=q.height}o=i.documentElement.createSVGPoint();o.x=s+t/2;o.y=p+n/2;o=o.matrixTransform(r);return{cx:o.x,cy:o.y,width:t*m,height:n*m,rotate:Math.atan2(r.b,r.a)*180/Math.PI}};d.getDocumentGeometry=function(){return{cx:k.x+k.width/2,cy:k.y+k.height/2,width:k.width,height:k.height,rotate:0,clip:false}};d.getCurrentGeometry=function(){return{cx:d.geometry.cx,cy:d.geometry.cy,width:d.geometry.width,height:d.geometry.height,rotate:d.geometry.rotate,clip:d.geometry.clip}};d.update=function(){var l=e(),n=-d.geometry.cx+d.geometry.width/2+l.x/l.scale,m=-d.geometry.cy+d.geometry.height/2+l.y/l.scale;a.setAttribute(&quot;transform&quot;,&quot;scale(&quot;+l.scale+&quot;)translate(&quot;+n+&quot;,&quot;+m+&quot;)rotate(&quot;+(-d.geometry.rotate)+&quot;,&quot;+d.geometry.cx+&quot;,&quot;+d.geometry.cy+&quot;)&quot;);c.setAttribute(&quot;x&quot;,d.geometry.clip?l.x:0);c.setAttribute(&quot;y&quot;,d.geometry.clip?l.y:0);c.setAttribute(&quot;width&quot;,d.geometry.clip?l.width:h.innerWidth);c.setAttribute(&quot;height&quot;,d.geometry.clip?l.height:h.innerHeight)};d.showFrame=function(m){var l;for(l in m.geometry){if(m.geometry.hasOwnProperty(l)){d.geometry[l]=m.geometry[l]}}d.update()};d.drag=function(m,l){var n=e(),o=d.geometry.rotate*Math.PI/180;d.geometry.cx-=(m*Math.cos(o)-l*Math.sin(o))/n.scale;d.geometry.cy-=(m*Math.sin(o)+l*Math.cos(o))/n.scale;d.geometry.clip=false;d.update()};d.zoom=function(o,m,p){var n=(1-o)*(m-h.innerWidth/2),l=(1-o)*(p-h.innerHeight/2);d.geometry.width/=o;d.geometry.height/=o;d.drag(n,l)};d.rotate=function(l){d.geometry.rotate+=l;d.geometry.rotate%=360;d.update()};sozi.events.listen(&quot;documentready&quot;,f);h.addEventListener(&quot;resize&quot;,b,false)}());var sozi=sozi||{};(function(){var c=sozi.document=sozi.document||{},g=this,a=g.document,f=&quot;http://sozi.baierouge.fr&quot;,d={title:&quot;Untitled&quot;,sequence:&quot;0&quot;,hide:&quot;true&quot;,clip:&quot;true&quot;,&quot;timeout-enable&quot;:&quot;false&quot;,&quot;timeout-ms&quot;:&quot;5000&quot;,&quot;transition-duration-ms&quot;:&quot;1000&quot;,&quot;transition-zoom-percent&quot;:&quot;0&quot;,&quot;transition-profile&quot;:&quot;linear&quot;};c.frames=[];function h(j,i){var k=j.getAttributeNS(f,i);return k===&quot;&quot;?d[i]:k}function b(){var j=a.getElementsByTagNameNS(f,&quot;frame&quot;),k=j.length,m,l,n;for(l=0;l&lt;k;l+=1){m=a.getElementById(j[l].getAttributeNS(f,&quot;refid&quot;));if(m){n={geometry:sozi.display.getElementGeometry(m),title:h(j[l],&quot;title&quot;),sequence:parseInt(h(j[l],&quot;sequence&quot;),10),hide:h(j[l],&quot;hide&quot;)===&quot;true&quot;,timeoutEnable:h(j[l],&quot;timeout-enable&quot;)===&quot;true&quot;,timeoutMs:parseInt(h(j[l],&quot;timeout-ms&quot;),10),transitionDurationMs:parseInt(h(j[l],&quot;transition-duration-ms&quot;),10),transitionZoomPercent:parseInt(h(j[l],&quot;transition-zoom-percent&quot;),10),transitionProfile:sozi.animation.profiles[h(j[l],&quot;transition-profile&quot;)||&quot;linear&quot;]};if(n.hide){m.setAttribute(&quot;visibility&quot;,&quot;hidden&quot;)}n.geometry.clip=h(j[l],&quot;clip&quot;)===&quot;true&quot;;c.frames.push(n)}}c.frames.sort(function(o,i){return o.sequence-i.sequence})}function e(){a.documentElement.removeAttribute(&quot;viewBox&quot;);b();sozi.events.fire(&quot;documentready&quot;)}g.addEventListener(&quot;load&quot;,e,false)}());var sozi=sozi||{};(function(){var a=sozi.location=sozi.location||{},e=this,c=false;a.getFrameIndex=function(){var g=e.location.hash?parseInt(e.location.hash.slice(1),10)-1:0;if(isNaN(g)||g&lt;0){return 0}else{if(g&gt;=sozi.document.frames.length){return sozi.document.frames.length-1}else{return g}}};function f(){confLang();var g=a.getFrameIndex();if(!c){sozi.player.moveToFrame(g)}c=false}function d(g){c=true;e.location.hash=&quot;#&quot;+(g+1)}function b(){sozi.events.listen(&quot;framechange&quot;,d)}e.addEventListener(&quot;hashchange&quot;,f,false);e.addEventListener(&quot;load&quot;,b,false)}());</script>
+  <style
+     id="sozi-style"
+     ns1:version="11.11-07001323">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}</style>
+  <ns1:frame
+     ns1:refid="rect3001"
+     ns1:sequence="1"
+     ns1:transition-duration-ms="1000"
+     ns1:hide="true"
+     ns1:clip="true"
+     ns1:title="f1"
+     ns1:transition-zoom-percent="0"
+     ns1:timeout-ms="5000"
+     ns1:timeout-enable="false"
+     ns1:transition-profile="linear" />
+  <ns1:frame
+     ns1:transition-profile="linear"
+     ns1:timeout-enable="false"
+     ns1:timeout-ms="5000"
+     ns1:transition-zoom-percent="0"
+     ns1:title="f2"
+     ns1:clip="true"
+     ns1:hide="true"
+     ns1:transition-duration-ms="1000"
+     ns1:sequence="2"
+     ns1:refid="rect3276" />
+</svg>

Added: trunk/docs/tutorials/lang.js
===================================================================
--- trunk/docs/tutorials/lang.js	                        (rev 0)
+++ trunk/docs/tutorials/lang.js	2012-02-22 01:51:24 UTC (rev 1692)
@@ -0,0 +1,17 @@
+// NOTE: add confLang() in each SVG like in: function f(){confLang();var g=a.getFrameIndex();
+// Also see the idLangList array defined in each SVG. Is a list of ids/langs
+
+function confLang() {   
+    var hs = window.location.hash;
+    if (typeof(hs)=='string') {
+	lang = hs.slice(1)
+	if (isNaN(lang)) {
+	    for (var i = 0; i < idLangList.length; i ++) {
+		// We show the layer id that match that lang
+		document.getElementById(idLangList[i].id).style.display =
+		    idLangList[i].layer === lang ? 'inline' : 'none';
+	    }
+	    window.location.hash = "";
+	}
+    }
+}




More information about the kune-commits mailing list