Matrix calc? How it's done?

Discuss SVG code, accessible via the XML Editor.
regular user
Posts: 2
Joined: Sat May 03, 2008 8:46 pm

Matrix calc? How it's done?

Postby regular user » Fri Jan 30, 2009 10:25 pm

I am trying to convert some graphics to another program. How does the matrix transformation work? For example the following line:

Code: Select all

     transform="matrix(1.25,0,0,-1.25,0,1052.5)"><path
   id="path6177"
   style="fill:none;stroke:#000000;stroke-width:0.95999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
   d="M 57.6,212.16 L 57.6,163.44" /><path
   id="path6179"


is in pt (x,y) -> (57.120 , 162,960) with height 49.68 (it's a vertical line)

What calculation are done to get above results?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Matrix calc? How it's done?

Postby microUgly » Sat Jan 31, 2009 7:57 am

I don't understand it, but I suspect this page has the best explaination - http://www.w3.org/TR/SVG11/coords.html# ... rixDefined

regular user
Posts: 2
Joined: Sat May 03, 2008 8:46 pm

Re: Matrix calc? How it's done?

Postby regular user » Sat Jan 31, 2009 7:00 pm

I read that page but appliying the matrix calc gives me a different result.

Is there any way to tell inkscape to transform every object from "matrix()" to "scale(1,-1) which easier to handle?

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Matrix calc? How it's done?

Postby microUgly » Sun Feb 01, 2009 3:15 pm

regular user wrote:Is there any way to tell inkscape to transform every object from "matrix()" to "scale(1,-1) which easier to handle?

Not that I'm aware of. Though if you were to use "scale(1,-1)" I think Inkscape will automatically convert it to the matrix value--that might be a convenience or not.


Return to “SVG / XML Code”