diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-07-28 13:01:58 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-07-28 13:01:58 +0000 |
commit | 909b93a2b94ac18245103d7f5e6231b0595f6fcd (patch) | |
tree | 38b5ca089374d4b96ee2a5e5cc512a481ae0c779 /src/sandbox | |
parent | dde2759a2110f3ab7b5d54712591087109e7b84a (diff) | |
download | xmlgraphics-fop-909b93a2b94ac18245103d7f5e6231b0595f6fcd.tar.gz xmlgraphics-fop-909b93a2b94ac18245103d7f5e6231b0595f6fcd.zip |
Reduce code duplication and make the toString() methods available to the outside (need them for debugging later).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@680338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/sandbox')
-rw-r--r-- | src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java b/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java index 980a67945..87f7a3df4 100644 --- a/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java +++ b/src/sandbox/org/apache/fop/render/svg/AbstractSVGPainter.java @@ -85,20 +85,7 @@ public abstract class AbstractSVGPainter extends AbstractXMLWritingIFPainter /** {@inheritDoc} */ public void startViewport(AffineTransform transform, Dimension size, Rectangle clipRect) throws IFException { - StringBuffer sb = new StringBuffer(); - toString(transform, sb); - startViewport(sb.toString(), size, clipRect); - } - - private String toString(AffineTransform[] transforms) { - StringBuffer sb = new StringBuffer(); - for (int i = 0, c = transforms.length; i < c; i++) { - if (i > 0) { - sb.append(' '); - } - toString(transforms[i], sb); - } - return sb.toString(); + startViewport(toString(transform), size, clipRect); } /** {@inheritDoc} */ @@ -166,9 +153,7 @@ public abstract class AbstractSVGPainter extends AbstractXMLWritingIFPainter /** {@inheritDoc} */ public void startGroup(AffineTransform transform) throws IFException { - StringBuffer sb = new StringBuffer(); - toString(transform, sb); - startGroup(sb.toString()); + startGroup(toString(transform)); } private void startGroup(String transform) throws IFException { |