You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ms...@apache.org on 2016/05/01 21:56:43 UTC

svn commit: r1741884 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java

Author: msahyoun
Date: Sun May  1 19:56:43 2016
New Revision: 1741884

URL: http://svn.apache.org/viewvc?rev=1741884&view=rev
Log:
PDFBOX-3333: fix source code formatting

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java?rev=1741884&r1=1741883&r2=1741884&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/AppearanceGeneratorHelper.java Sun May  1 19:56:43 2016
@@ -162,17 +162,18 @@ class AppearanceGeneratorHelper
         }
     }
     
-    private int resolveRotation(PDAnnotationWidget widget) {
-		PDAppearanceCharacteristicsDictionary  characteristicsDictionary = widget.getAppearanceCharacteristics();
-		if (characteristicsDictionary != null)
-		{
-			// 0 is the default value if the R key doesn't exist
-			return characteristicsDictionary.getRotation();
-		}
-		return 0;
-	}
+    private int resolveRotation(PDAnnotationWidget widget)
+    {
+        PDAppearanceCharacteristicsDictionary  characteristicsDictionary = widget.getAppearanceCharacteristics();
+        if (characteristicsDictionary != null)
+        {
+            // 0 is the default value if the R key doesn't exist
+            return characteristicsDictionary.getRotation();
+        }
+        return 0;
+    }
 
-	/**
+    /**
      * Initialize the content of the appearance stream.
      * 
      * Get settings like border style, border width and colors to be used to draw a rectangle and background color 
@@ -402,33 +403,36 @@ class AppearanceGeneratorHelper
         contents.close();
     }
     
-    private AffineTransform calculateMatrix(PDRectangle bbox, int rotation) {
-		if (rotation == 0)
-		{
-			return new AffineTransform();
-		}
-		else
-		{
-			float tx=0, ty=0;
-			
-			if (rotation == 90)
-			{
-				tx = bbox.getUpperRightY();
-			} else if (rotation == 180)
-			{
-				tx = bbox.getUpperRightY();
-				ty = bbox.getUpperRightX();
-			} else if (rotation == 270)
-			{
-				ty = bbox.getUpperRightX();
-			}
-			
-			Matrix matrix = Matrix.getRotateInstance(Math.toRadians(rotation), tx, ty);
-			return matrix.createAffineTransform();
-		}
-	}
+    private AffineTransform calculateMatrix(PDRectangle bbox, int rotation)
+    {
+        if (rotation == 0)
+        {
+            return new AffineTransform();
+        }
+        else
+        {
+            float tx=0, ty=0;
+
+            if (rotation == 90)
+            {
+                tx = bbox.getUpperRightY();
+            }
+            else if (rotation == 180)
+            {
+                tx = bbox.getUpperRightY();
+                ty = bbox.getUpperRightX();
+            }
+            else if (rotation == 270)
+            {
+                ty = bbox.getUpperRightX();
+            }
+
+            Matrix matrix = Matrix.getRotateInstance(Math.toRadians(rotation), tx, ty);
+            return matrix.createAffineTransform();
+        }
+    }
 
-	private boolean isMultiLine()
+    private boolean isMultiLine()
     {
         return field instanceof PDTextField && ((PDTextField) field).isMultiline();
     }