diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2014-07-14 21:24:52 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2014-07-14 21:24:52 +0000 |
commit | bff76cd4a3e2cbb48238154abb968e6773301834 (patch) | |
tree | 4edacb78d05195e762a9e5da8eb749b6ec27dfb5 /src/java/org/apache | |
parent | cc8de67793c578b4e33860db6f11ab18e2aeee20 (diff) | |
download | xmlgraphics-fop-bff76cd4a3e2cbb48238154abb968e6773301834.tar.gz xmlgraphics-fop-bff76cd4a3e2cbb48238154abb968e6773301834.zip |
Rename toWriteableString into output and added StringBuilder parameter
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP-2393_gradient-rendering@1610537 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/pdf/PDFFunction.java | 4 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/gradient/Function.java | 3 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/ps/svg/PSSVGGraphics2D.java | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFFunction.java b/src/java/org/apache/fop/pdf/PDFFunction.java index be74dfc10..ed2d1d16c 100644 --- a/src/java/org/apache/fop/pdf/PDFFunction.java +++ b/src/java/org/apache/fop/pdf/PDFFunction.java @@ -118,7 +118,9 @@ public class PDFFunction extends PDFObject { out.append(pdfFunctions.get(functionIndex).referencePDF()); } }; - return encode(function.toWriteableString(subFunctionRenderer)); + StringBuilder out = new StringBuilder(); + function.output(out, subFunctionRenderer); + return encode(out.toString()); } /** {@inheritDoc} */ diff --git a/src/java/org/apache/fop/render/gradient/Function.java b/src/java/org/apache/fop/render/gradient/Function.java index e83f6dc05..220c5f791 100644 --- a/src/java/org/apache/fop/render/gradient/Function.java +++ b/src/java/org/apache/fop/render/gradient/Function.java @@ -338,8 +338,7 @@ public class Function { return cOne; } - public String toWriteableString(SubFunctionRenderer subFunctionRenderer) { - StringBuilder out = new StringBuilder(256); + public String output(StringBuilder out, SubFunctionRenderer subFunctionRenderer) { out.append("<<\n/FunctionType " + functionType + "\n"); outputDomain(out); if (this.functionType == 0) { diff --git a/src/java/org/apache/fop/render/ps/svg/PSSVGGraphics2D.java b/src/java/org/apache/fop/render/ps/svg/PSSVGGraphics2D.java index b8ddc20d8..a89b16bde 100644 --- a/src/java/org/apache/fop/render/ps/svg/PSSVGGraphics2D.java +++ b/src/java/org/apache/fop/render/ps/svg/PSSVGGraphics2D.java @@ -121,7 +121,7 @@ public class PSSVGGraphics2D extends PSGraphics2D { return p.toString(); } - private void outputShading(StringBuilder p, Shading shading) { + private void outputShading(StringBuilder out, Shading shading) { final Function function = shading.getFunction(); Shading.FunctionRenderer functionRenderer = new Shading.FunctionRenderer() { @@ -131,13 +131,13 @@ public class PSSVGGraphics2D extends PSGraphics2D { public void outputFunction(StringBuilder out, int functionIndex) { Function subFunction = function.getFunctions().get(functionIndex); assert subFunction.getFunctions().isEmpty(); - out.append(subFunction.toWriteableString(null)); + subFunction.output(out, null); } }; - out.append(function.toWriteableString(subFunctionRenderer)); + function.output(out, subFunctionRenderer); } }; - shading.output(p, functionRenderer); + shading.output(out, functionRenderer); } protected AffineTransform getBaseTransform() { |