pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1769016 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/pattern/PDAbstractPattern.java
Date Wed, 09 Nov 2016 22:03:36 GMT
Author: tilman
Date: Wed Nov  9 22:03:36 2016
New Revision: 1769016

URL: http://svn.apache.org/viewvc?rev=1769016&view=rev
Log:
PDFBOX-2852: clarify misleading javadoc

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/pattern/PDAbstractPattern.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/pattern/PDAbstractPattern.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/pattern/PDAbstractPattern.java?rev=1769016&r1=1769015&r2=1769016&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/pattern/PDAbstractPattern.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/pattern/PDAbstractPattern.java
Wed Nov  9 22:03:36 2016
@@ -27,7 +27,7 @@ import org.apache.pdfbox.pdmodel.common.
 import org.apache.pdfbox.util.Matrix;
 
 /**
- * A Pattern dictionary from a page's resources.
+ * This class wraps a pattern dictionary. Patterns can be found in resource dictionaries.
  */
 public abstract class PDAbstractPattern implements COSObjectable
 {
@@ -39,21 +39,21 @@ public abstract class PDAbstractPattern
 
     /**
      * Create the correct PD Model pattern based on the COS base pattern.
-     * @param resourceDictionary the COS pattern dictionary
-     * @return the newly created pattern resources object
+     * @param dictionary the COS pattern dictionary
+     * @return the newly created pattern object
      * @throws IOException If we are unable to create the PDPattern object.
      */
-    public static PDAbstractPattern create(COSDictionary resourceDictionary) throws IOException
+    public static PDAbstractPattern create(COSDictionary dictionary) throws IOException
     {
         PDAbstractPattern pattern;
-        int patternType = resourceDictionary.getInt(COSName.PATTERN_TYPE, 0);
+        int patternType = dictionary.getInt(COSName.PATTERN_TYPE, 0);
         switch (patternType)
         {
             case TYPE_TILING_PATTERN:
-                pattern = new PDTilingPattern(resourceDictionary);
+                pattern = new PDTilingPattern(dictionary);
                 break;
             case TYPE_SHADING_PATTERN:
-                pattern = new PDShadingPattern(resourceDictionary);
+                pattern = new PDShadingPattern(dictionary);
                 break;
             default:
                 throw new IOException("Error: Unknown pattern type " + patternType);
@@ -74,16 +74,16 @@ public abstract class PDAbstractPattern
 
     /**
      * Creates a new Pattern dictionary from the given COS dictionary.
-     * @param resourceDictionary The COSDictionary for this pattern resource.
+     * @param dictionary The COSDictionary for this pattern.
      */
-    public PDAbstractPattern(COSDictionary resourceDictionary)
+    public PDAbstractPattern(COSDictionary dictionary)
     {
-        patternDictionary = resourceDictionary;
+        patternDictionary = dictionary;
     }
 
     /**
      * This will get the underlying dictionary.
-     * @return The dictionary for these pattern resources.
+     * @return The dictionary for this pattern.
      */
     @Override
     public COSDictionary getCOSObject()



Mime
View raw message