diff options
author | Keiron Liddle <keiron@apache.org> | 2003-01-11 19:38:52 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2003-01-11 19:38:52 +0000 |
commit | 2c1fdfe32eee04d96bd4cc736e7bb164cf031efa (patch) | |
tree | e41729f0f604a3bae44492d633f233b538b4c525 /src/org/apache/fop/pdf/PDFPattern.java | |
parent | 19c1ab18a9d22898f0893a0e1890b7e69f965ae1 (diff) | |
download | xmlgraphics-fop-2c1fdfe32eee04d96bd4cc736e7bb164cf031efa.tar.gz xmlgraphics-fop-2c1fdfe32eee04d96bd4cc736e7bb164cf031efa.zip |
cleaned up some style errors
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195843 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/pdf/PDFPattern.java')
-rw-r--r-- | src/org/apache/fop/pdf/PDFPattern.java | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/org/apache/fop/pdf/PDFPattern.java b/src/org/apache/fop/pdf/PDFPattern.java index 4e4fc1226..c46d1a7d2 100644 --- a/src/org/apache/fop/pdf/PDFPattern.java +++ b/src/org/apache/fop/pdf/PDFPattern.java @@ -1,6 +1,6 @@ /* * $Id$ - * Copyright (C) 2001-2002 The Apache Software Foundation. All rights reserved. + * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved. * For details on use and redistribution please refer to the * LICENSE file included with these sources. */ @@ -28,8 +28,6 @@ public class PDFPattern extends PDFPathPaint { /** * The resources associated with this pattern */ - // Guts common to all function types - protected PDFResources resources = null; /** @@ -170,6 +168,12 @@ public class PDFPattern extends PDFPathPaint { return (this.patternName); } + /** + * Get the PDF command for setting to this pattern. + * + * @param fillNotStroke if true fill otherwise stroke + * @return the PDF string for setting the pattern + */ public String getColorSpaceOut(boolean fillNotStroke) { if (fillNotStroke) { // fill but no stroke return ("/Pattern cs /" + this.getName() + " scn \n"); @@ -178,7 +182,6 @@ public class PDFPattern extends PDFPathPaint { } } - /** * represent as PDF. Whatever the FunctionType is, the correct * representation spits out. The sets of required and optional @@ -188,6 +191,8 @@ public class PDFPattern extends PDFPathPaint { * by the construction is dutifully output. * This policy should be reviewed. * + * @param stream the stream to write to + * @throws IOException if there is an error writing to the stream * @return the PDF string. */ protected int output(OutputStream stream) throws IOException { @@ -254,8 +259,9 @@ public class PDFPattern extends PDFPathPaint { + " \n"); } - } else // if (this.patternType ==2) - { // Smooth Shading... + } else { + // if (this.patternType ==2) + // Smooth Shading... if (this.shading != null) { p.append("/Shading " + this.shading.referencePDF() + " \n"); } @@ -300,13 +306,21 @@ public class PDFPattern extends PDFPathPaint { stream.write(end.getBytes()); length += end.length(); - return length; - } + /** + * Output PDF bytes, not used. + * @return returns null + */ public byte[] toPDF() { return null; } + /** + * Check if this pattern is equal to another. + * + * @param obj the object to compare against + * @return true if the patterns are equal + */ public boolean equals(Object obj) { if (obj == null) { return false; |