From e45ac98d19bee6c8af59f2a276e73bfacabc7220 Mon Sep 17 00:00:00 2001 From: kitfox Date: Fri, 27 Jun 2014 14:49:25 +0000 Subject: Fixing SVGSALAMANDER-39. Viewport is now no longer set when rendering a diagram from within tag. git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@181 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- src/main/java/com/kitfox/svg/SVGDiagram.java | 2 +- src/main/java/com/kitfox/svg/SVGRoot.java | 2 +- src/main/java/com/kitfox/svg/Use.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/kitfox/svg/SVGDiagram.java b/src/main/java/com/kitfox/svg/SVGDiagram.java index a6942b7..3a89075 100644 --- a/src/main/java/com/kitfox/svg/SVGDiagram.java +++ b/src/main/java/com/kitfox/svg/SVGDiagram.java @@ -102,7 +102,7 @@ public class SVGDiagram implements Serializable */ public void render(Graphics2D g) throws SVGException { - root.render(g); + root.renderToViewport(g); } /** diff --git a/src/main/java/com/kitfox/svg/SVGRoot.java b/src/main/java/com/kitfox/svg/SVGRoot.java index a4ccfb0..89a772e 100644 --- a/src/main/java/com/kitfox/svg/SVGRoot.java +++ b/src/main/java/com/kitfox/svg/SVGRoot.java @@ -258,7 +258,7 @@ public class SVGRoot extends Group // } } - public void render(Graphics2D g) throws SVGException + public void renderToViewport(Graphics2D g) throws SVGException { prepareViewport(); diff --git a/src/main/java/com/kitfox/svg/Use.java b/src/main/java/com/kitfox/svg/Use.java index f217b88..4219c6e 100644 --- a/src/main/java/com/kitfox/svg/Use.java +++ b/src/main/java/com/kitfox/svg/Use.java @@ -123,7 +123,7 @@ public class Use extends ShapeElement return; } - RenderableElement rendEle = (RenderableElement) ref; + RenderableElement rendEle = (RenderableElement)ref; rendEle.pushParentContext(this); rendEle.render(g); rendEle.popParentContext(); -- cgit v1.2.3-55-g7522