Lively Kernel canvas
// this script is evaluated on world load
Documentation:Geometry40
10001.5583287921705073Wikicontroltrue
//SVGMatrixtfm.flipX()tfm.flipY()tfm.inverse()tfm.multiply(tfm2)tfm.translate(a,b)tfm.rotate(agnle)tfm.rotateFromVector(a,b)tfm.atfm.btfm.c//translationtfm.e=10tfm.f=20//??tfm.scale()tfm.scaleNonUniform()tfm.skewX()tfm.skewY()21
locateCanvas=functionlocateCanvas(){//dirtysecretreturnGlobal.document.getElementById("canvas");}tfm=locateCanvas().createSVGMatrix();tfm2=locateCanvas().createSVGMatrix();//translationtfm.e=10tfm.f=20//translationtfm2.e=30tfm2.f=40tfm3=tfm.multiply(tfm2)//LivelywrapstheTransformationsinsideoflively.scene.Similitudes=newlively.scene.Similitude(tfm3)s.toMatrix()//->[objectSVGMatrix]this.getTransform().constructor.type//->lively.scene.Similitude27 [object SVGMatrix]\n\nthis.getTransform().constructor.type // -> lively.scene.Similitude\n\n\n"]]>
Matrix30
SomefindingsaboutSVGMatrix:14null31