Mobile app version of vmapp.org
Login or Join
Karen819

: SVG: Understanding the Translate command 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

@Karen819

Posted in: #Svg #Transform

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Karen819

2 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn212

I can think of at least two possible reasons: either


the untranslated coordinates of the group are far off the page, and the translate moves them into the page area, or
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.

10% popularity Vote Up Vote Down


 

@Si6392903

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme