Dart SVG Matrix Transformation -


I am trying to create a square (in dart) which makes a SVG group variable through metrics. I have tried to use the 'setAttribute' route, and it works for a single SvgElement:

Conversion class:

  string _x; Element_transport element; Zero setx (int value) {_x = value.toString (); _transformElement.setAttribute ('x', _x); }  

DART file:

  Transform test = new transform ('test object'); Zero main () {test.setX (25); }  

However, I would like to be able to run all the sets through a matrix. Here's my code:

Conversion Class:

  Matrix _matrix; Zero set x (int value) = & gt; Set transform (x: value); Zero Set Transform ({Integer scale X: blank, intra squaws: faucet, int skew: null, int scale: faucet, int x: faucet, int y: faucet}) {_matrix.a = scaleX; _matrix.b = skewX; _matrix.c = skewY; _matrix.d = scaleY; _matrix.e = x; _matrix.f = y; _transformElement.setAttribute ('width', _matrix.a.toString ()); _transformElement.setAttribute ('height', _matrix.d.toString ()); _transformElement.setAttribute ('x', _matrix.e.toString ()); _transformElement.setAttribute ('y', _matrix.f.toString ()); }  

My error is that _matrix is ​​zero. Apart from this, I would like to work for a group of SVG objects and not just a SVG statement

To get matrix you can call that you can manipulate

If you are working in a SVG document, you can call it like this.

  var matrix = document.documentElement createSVGMatrix ();  

If you have an HTML document with Inline SVG, then you have to get the root SVG element and make the CreateMatrix call on it.


Comments

Popular posts from this blog

c++ - C/pp Sockets, recv()/send() works only under gdb -

GO: Serve static pages -

objective c - How to open front/back camera at the same time in iOS developing? -