From what I understand, the SVG Translate transformation offsets the coordinates by a given X and a given Y. So if drawing something at (80,100) and applying a translate(-10,-10) would draw the object at (70,90).

That being said, I have an SVG file that has a page width of 744 by 1052. One of the groups tag applies a transformation of translate(-5774.2676,3117.0866). What I'm trying to understand is how this is not completely off the entire page (which it isn't). Can someone help me to figure this out?

  • Likely better asked at StackOverflow. This is more of a code syntax question than graphic design. – DA01 Mar 14 '12 at 19:48
  • @DA01 Just posted the question over there too. Thanks – Alan Bryan Mar 14 '12 at 19:57
  • Closing this question since it was cross-posted at SO. – Farray Mar 19 '12 at 19:32

I think it will be best to take a look at SVG specification, into Coordinate Systems, Transformations and Units section. In SVG it's possible to “define” or rather “redefine” coordinate system – there's a default one but it's not an “absolute” coordinate system. That could explain why object you mentioned is still visible. Without complete SVG file one can only guess.


I can think of at least two possible reasons: either

  1. the untranslated coordinates of the group are far off the page, and the translate moves them into the page area, or

  2. the same group, or one of its parents, has a scale (or matrix) transformation applied that shrinks it down, so that the actual translation in page coordinates is much less.

Of course, it could also be both.

Not the answer you're looking for? Browse other questions tagged or ask your own question.