out.append(pdfFunctions.get(functionIndex).referencePDF());
}
};
- return encode(function.toWriteableString(subFunctionRenderer));
+ StringBuilder out = new StringBuilder();
+ function.output(out, subFunctionRenderer);
+ return encode(out.toString());
}
/** {@inheritDoc} */
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) {
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() {
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() {