You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by le...@apache.org on 2018/03/19 18:34:50 UTC

svn commit: r1827222 - in /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream: PDContentStream.java PDFGraphicsStreamEngine.java PDFStreamEngine.java

Author: lehmi
Date: Mon Mar 19 18:34:50 2018
New Revision: 1827222

URL: http://svn.apache.org/viewvc?rev=1827222&view=rev
Log:
PDFBOX-4071: fix javadoc

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java?rev=1827222&r1=1827221&r2=1827222&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java Mon Mar 19 18:34:50 2018
@@ -40,16 +40,22 @@ public interface PDContentStream
 
     /**
      * Returns this stream's resources, if any.
+     * 
+     * @return the resources of this stream.
      */
     PDResources getResources();
 
     /**
      * Returns the bounding box of the contents.
+     * 
+     * @return the bounding box of this stream.
      */
     PDRectangle getBBox();
 
     /**
      * Returns the matrix which transforms from the stream's space to user space.
+     * 
+     * @return the matrix of this stream.
      */
     Matrix getMatrix();
 }

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java?rev=1827222&r1=1827221&r2=1827222&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java Mon Mar 19 18:34:50 2018
@@ -169,6 +169,9 @@ public abstract class PDFGraphicsStreamE
 
     /**
      * Returns the page.
+     * 
+     * @return the page.
+     * 
      */
     protected final PDPage getPage()
     {
@@ -177,6 +180,13 @@ public abstract class PDFGraphicsStreamE
 
     /**
      * Append a rectangle to the current path.
+     * 
+     * @param p0 point P0 of the rectangle.
+     * @param p1 point P1 of the rectangle.
+     * @param p2 point P2 of the rectangle.
+     * @param p3 point P3 of the rectangle.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void appendRectangle(Point2D p0, Point2D p1,
                                          Point2D p2, Point2D p3) throws IOException;
@@ -185,29 +195,52 @@ public abstract class PDFGraphicsStreamE
      * Draw the image.
      *
      * @param pdImage The image to draw.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void drawImage(PDImage pdImage) throws IOException;
 
     /**
-     * Modify the current clipping path by intersecting it with the current path.
-     * The clipping path will not be updated until the succeeding painting operator is called.
+     * Modify the current clipping path by intersecting it with the current path. The clipping path will not be updated
+     * until the succeeding painting operator is called.
      *
      * @param windingRule The winding rule which will be used for clipping.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void clip(int windingRule) throws IOException;
 
     /**
      * Starts a new path at (x,y).
+     * 
+     * @param x x-coordinate of the target point.
+     * @param y y-coordinate of the target point.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void moveTo(float x, float y) throws IOException;
 
     /**
      * Draws a line from the current point to (x,y).
+     * 
+     * @param x x-coordinate of the end point of the line.
+     * @param y y-coordinate of the end point of the line.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void lineTo(float x, float y) throws IOException;
 
     /**
      * Draws a curve from the current point to (x3,y3) using (x1,y1) and (x2,y2) as control points.
+     * 
+     * @param x1 x-coordinate of the first control point.
+     * @param y1 y-coordinate of the first control point.
+     * @param x2 x-coordinate of the second control point.
+     * @param y2 y-coordinate of the second control point.
+     * @param x3 x-coordinate of the end point of the curve.
+     * @param y3 y-coordinate of the end point of the curve.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void curveTo(float x1, float y1,
                                  float x2, float y2,
@@ -215,16 +248,24 @@ public abstract class PDFGraphicsStreamE
 
     /**
      * Returns the current point of the current path.
+     * 
+     * @return the current point.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract Point2D getCurrentPoint() throws IOException;
 
     /**
      * Closes the current path.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void closePath() throws IOException;
 
     /**
      * Ends the current path without filling or stroking it. The clipping path is updated here.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void endPath() throws IOException;
 
@@ -239,6 +280,8 @@ public abstract class PDFGraphicsStreamE
      * Fill the path.
      *
      * @param windingRule The winding rule this path will use.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void fillPath(int windingRule) throws IOException;
 
@@ -246,6 +289,8 @@ public abstract class PDFGraphicsStreamE
      * Fills and then strokes the path.
      *
      * @param windingRule The winding rule this path will use.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void fillAndStrokePath(int windingRule) throws IOException;
 
@@ -253,6 +298,8 @@ public abstract class PDFGraphicsStreamE
      * Fill with Shading.
      *
      * @param shadingName The name of the Shading Dictionary to use for this fill instruction.
+     * 
+     * @throws IOException if something went wrong.
      */
     public abstract void shadingFill(COSName shadingName) throws IOException;
 }

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1827222&r1=1827221&r2=1827222&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java (original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Mon Mar 19 18:34:50 2018
@@ -184,7 +184,9 @@ public abstract class PDFStreamEngine
 
     /**
      * Processes a soft mask transparency group stream.
-     * @param group
+     * 
+     * @param group the transparency group.
+     * 
      * @throws IOException
      */
     protected void processSoftMask(PDTransparencyGroup group) throws IOException
@@ -198,7 +200,9 @@ public abstract class PDFStreamEngine
 
     /**
      * Processes a transparency group stream.
-     * @param group
+     * 
+     * @param group the transparency group.
+     * 
      * @throws IOException
      */
     protected void processTransparencyGroup(PDTransparencyGroup group) throws IOException
@@ -432,7 +436,8 @@ public abstract class PDFStreamEngine
      * Process a child stream of the given page. Cannot be used with {@link #processPage(PDPage)}.
      *
      * @param contentStream the child content stream
-     * @param page
+     * @param page the current page
+     * 
      * @throws IOException if there is an exception while processing the stream
      */
     protected void processChildStream(PDContentStream contentStream, PDPage page) throws IOException
@@ -646,6 +651,8 @@ public abstract class PDFStreamEngine
      *
      * @param tx x-translation
      * @param ty y-translation
+     * 
+     * @throws IOException if something went wrong
      */
     protected void applyTextAdjustment(float tx, float ty) throws IOException
     {
@@ -856,6 +863,8 @@ public abstract class PDFStreamEngine
      *
      * @param operator The unknown operator.
      * @param operands The list of operands.
+     * 
+     * @throws IOException if something went wrong
      */
     protected void unsupportedOperator(Operator operator, List<COSBase> operands) throws IOException
     {
@@ -867,6 +876,9 @@ public abstract class PDFStreamEngine
      *
      * @param operator The unknown operator.
      * @param operands The list of operands.
+     * @param e the thrown exception.
+     * 
+     * @throws IOException if something went wrong
      */
     protected void operatorException(Operator operator, List<COSBase> operands, IOException e)
             throws IOException
@@ -911,6 +923,8 @@ public abstract class PDFStreamEngine
 
     /**
      * Saves the entire graphics stack.
+     * 
+     * @return the saved graphics state stack.
      */
     protected final Stack<PDGraphicsState> saveGraphicsStack()
     {
@@ -922,6 +936,8 @@ public abstract class PDFStreamEngine
 
     /**
      * Restores the entire graphics stack.
+     * 
+     * @param the graphics state stack to be restored.
      */
     protected final void restoreGraphicsStack(Stack<PDGraphicsState> snapshot)
     {
@@ -992,7 +1008,7 @@ public abstract class PDFStreamEngine
     }
 
     /**
-     * Returns the stream' resources.
+     * @return the stream' resources.
      */
     public PDResources getResources()
     {
@@ -1000,7 +1016,7 @@ public abstract class PDFStreamEngine
     }
 
     /**
-     * Returns the current page.
+     * @return the current page.
      */
     public PDPage getCurrentPage()
     {
@@ -1009,6 +1025,8 @@ public abstract class PDFStreamEngine
 
     /**
      * Gets the stream's initial matrix.
+     * 
+     * @return the initial matrix.
      */
     public Matrix getInitialMatrix()
     {
@@ -1017,6 +1035,11 @@ public abstract class PDFStreamEngine
 
     /**
      * Transforms a point using the CTM.
+     * 
+     * @param x x-coordinate of the point to be transformed.
+     * @param y y-coordinate of the point to be transformed.
+     * 
+     * @return the transformed point.
      */
     public Point2D.Float transformedPoint(float x, float y)
     {
@@ -1028,6 +1051,10 @@ public abstract class PDFStreamEngine
 
     /**
      * Transforms a width using the CTM.
+     * 
+     * @param width the width value to be transformed.
+     * 
+     * @return the transformed width value.
      */
     protected float transformWidth(float width)
     {