Skip to content
Permalink
Browse files

Fix order of concatentation of nested transforms

  • Loading branch information...
stuikomma authored and t-oster committed Apr 25, 2019
1 parent 5e57910 commit 57b7c89268093178a19d4d9cb7b6fb2e063ae53a
Showing with 6 additions and 4 deletions.
  1. +6 −4 src/com/t_oster/visicut/model/graphicelements/svgsupport/SVGObject.java
@@ -26,6 +26,7 @@
import java.awt.Rectangle;
import java.awt.geom.AffineTransform;
import java.awt.geom.Rectangle2D;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -82,11 +83,13 @@ public AffineTransform getAbsoluteTransformation() throws SVGException
if (this.getDecoratee() != null)
{
AffineTransform tr = new AffineTransform();
for (Object o : this.getPathToRoot())
List<SVGElement> pathToRoot = this.getPathToRoot();
Collections.reverse(pathToRoot);
for (Object o : pathToRoot)
{
if (o instanceof Group)
{
StyleAttribute sty = new StyleAttribute("transform");
StyleAttribute sty = new StyleAttribute("transform");
if (((SVGElement) o).getPres(sty))
{
String value = sty.getStringValue();
@@ -96,8 +99,7 @@ public AffineTransform getAbsoluteTransformation() throws SVGException
if (!"".equals(v))
{
AffineTransform trans = SVGElement.parseSingleTransform(v+")");
trans.concatenate(tr);
tr = trans;
tr.concatenate(trans);
}
}
}

0 comments on commit 57b7c89

Please sign in to comment.
You can’t perform that action at this time.