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 2022/11/04 06:59:21 UTC
svn commit: r1905057 - in /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream: PDContentStream.java PDFGraphicsStreamEngine.java PDFStreamEngine.java
Author: lehmi
Date: Fri Nov 4 06:59:21 2022
New Revision: 1905057
URL: http://svn.apache.org/viewvc?rev=1905057&view=rev
Log:
PDFBOX-4892: fix javadoc
Modified:
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java
pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java?rev=1905057&r1=1905056&r2=1905057&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDContentStream.java Fri Nov 4 06:59:21 2022
@@ -49,16 +49,23 @@ public interface PDContentStream
/**
* Returns this stream's resources, if any.
+ *
+ * @return the resources of the content stream or null
*/
PDResources getResources();
/**
* Returns the bounding box of the contents.
+ *
+ * @return the bounding box of the content stream or null
+ *
*/
PDRectangle getBBox();
/**
* Returns the matrix which transforms from the stream's space to user space.
+ *
+ * @return the matrix of the content stream or the identity matrix if there isn't any
*/
Matrix getMatrix();
}
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java?rev=1905057&r1=1905056&r2=1905057&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFGraphicsStreamEngine.java Fri Nov 4 06:59:21 2022
@@ -187,6 +187,13 @@ public abstract class PDFGraphicsStreamE
/**
* Append a rectangle to the current path.
+ *
+ * @param p0 starting coordinate of the rectangle
+ * @param p1 second coordinate of the rectangle
+ * @param p2 third coordinate of the rectangle
+ * @param p3 last coordinate of the rectangle
+ *
+ * @throws IOException if the rectangle could not be appended
*/
public abstract void appendRectangle(Point2D p0, Point2D p1,
Point2D p2, Point2D p3) throws IOException;
@@ -195,29 +202,52 @@ public abstract class PDFGraphicsStreamE
* Draw the image.
*
* @param pdImage The image to draw.
+ *
+ * @throws IOException if the image could not be drawn
*/
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 the clipping path could not be modified
*/
public abstract void clip(int windingRule) throws IOException;
/**
* Starts a new path at (x,y).
+ *
+ * @param x the x-coordinate to move to
+ * @param y the y-coordinate to move to
+ *
+ * @throws IOException if the something went wrong when moving to the given coordinate
*/
public abstract void moveTo(float x, float y) throws IOException;
/**
* Draws a line from the current point to (x,y).
+ *
+ * @param x the X-coordinate of the ending-point of the line to be drawn
+ * @param y the Y-coordinate of the ending-point of the line to be drawn
+ *
+ * @throws IOException if the line could not be drawn
*/
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 the X coordinate of the first Bézier control point
+ * @param y1 the Y coordinate of the first Bézier control point
+ * @param x2 the X coordinate of the second Bézier control point
+ * @param y2 the Y coordinate of the second Bézier control point
+ * @param x3 the X coordinate of the final end point
+ * @param y3 the Y coordinate of the final end point
+ *
+ * @throws IOException if the curve could not be drawn
*/
public abstract void curveTo(float x1, float y1,
float x2, float y2,
@@ -225,16 +255,24 @@ public abstract class PDFGraphicsStreamE
/**
* Returns the current point of the current path.
+ *
+ * @return the current point or null
+ *
+ * @throws IOException if the something went wrong when providing the current point
*/
public abstract Point2D getCurrentPoint() throws IOException;
/**
* Closes the current path.
+ *
+ * @throws IOException if the current path could not be closed
*/
public abstract void closePath() throws IOException;
/**
* Ends the current path without filling or stroking it. The clipping path is updated here.
+ *
+ * @throws IOException if the current path could not be ended
*/
public abstract void endPath() throws IOException;
@@ -249,6 +287,8 @@ public abstract class PDFGraphicsStreamE
* Fill the path.
*
* @param windingRule The winding rule this path will use.
+ *
+ * @throws IOException if the path could not be filled
*/
public abstract void fillPath(int windingRule) throws IOException;
@@ -256,6 +296,8 @@ public abstract class PDFGraphicsStreamE
* Fills and then strokes the path.
*
* @param windingRule The winding rule this path will use.
+ *
+ * @throws IOException if the path could not be filled and stroke
*/
public abstract void fillAndStrokePath(int windingRule) throws IOException;
@@ -263,6 +305,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 the path could not be filled using the given shading
*/
public abstract void shadingFill(COSName shadingName) throws IOException;
}
Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java?rev=1905057&r1=1905056&r2=1905057&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/contentstream/PDFStreamEngine.java Fri Nov 4 06:59:21 2022
@@ -927,7 +927,7 @@ public abstract class PDFStreamEngine
*
* @param operator The unknown operator.
* @param operands The list of operands.
- * @param exception
+ * @param exception the excpetion which occured when processing the operator
*
* @throws IOException if there is an error processing the operator exception
*/