You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by dv...@apache.org on 2006/11/13 14:46:23 UTC

svn commit: r474311 - /xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/MorphologyOp.java

Author: dvholten
Date: Mon Nov 13 05:46:22 2006
New Revision: 474311

URL: http://svn.apache.org/viewvc?view=rev&rev=474311
Log:
remove new String("str")

Modified:
    xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/MorphologyOp.java

Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/MorphologyOp.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/MorphologyOp.java?view=diff&rev=474311&r1=474310&r2=474311
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/MorphologyOp.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/image/rendered/MorphologyOp.java Mon Nov 13 05:46:22 2006
@@ -1,6 +1,6 @@
 /*
 
-   Copyright 2001,2003  The Apache Software Foundation 
+   Copyright 2001,2003  The Apache Software Foundation
 
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
@@ -91,7 +91,7 @@
      */
     public MorphologyOp (int radiusX, int radiusY, boolean doDilation){
         if (radiusX<=0 || radiusY<=0){
-            throw new IllegalArgumentException(new String("The radius of X-axis or Y-axis should not be Zero or Negatives."));
+            throw new IllegalArgumentException( "The radius of X-axis or Y-axis should not be Zero or Negatives." );
         }
         else {
             this.radiusX = radiusX;
@@ -181,7 +181,7 @@
         // Check model is ok: should be SinglePixelPackedSampleModel
         if(!(model instanceof SinglePixelPackedSampleModel))
             throw new IllegalArgumentException
-                ("MorphologyOp only works with Rasters " + 
+                ("MorphologyOp only works with Rasters " +
                  "using SinglePixelPackedSampleModels");
         // Check number of bands
         int nBands = model.getNumBands();
@@ -213,7 +213,7 @@
         return src.createCompatibleWritableRaster();
     }
 
-    public BufferedImage createCompatibleDestImage(BufferedImage src, 
+    public BufferedImage createCompatibleDestImage(BufferedImage src,
                                                    ColorModel destCM){
         BufferedImage dest = null;
         if(destCM==null)
@@ -224,7 +224,7 @@
                                                    src.getHeight());
         checkCompatible(destCM, wr.getSampleModel());
 
-        dest = new BufferedImage(destCM, wr, 
+        dest = new BufferedImage(destCM, wr,
                                  destCM.isAlphaPremultiplied(), null);
         return dest;
     }
@@ -315,7 +315,7 @@
                     r1 = currentPixel&0xff0000;
                     g1 = currentPixel&0xff00;
                     b1 = currentPixel&0xff;
-                    
+
                     if (isBetter(a1, a, doDilation)){
                         a = a1;
                     }
@@ -1551,7 +1551,7 @@
 
             src = new BufferedImage(srcCMPre, src.getRaster(),
                                     true, null);
-            
+
             GraphicsUtil.copyData(origSrc, src);
         }
 
@@ -1614,7 +1614,7 @@
             srcCMUnpre = GraphicsUtil.coerceColorModel(srcCM, false);
             src = new BufferedImage(srcCMUnpre, src.getRaster(),
                                     false, null);
-            
+
             GraphicsUtil.copyData(origSrc, src);
         }
 
@@ -1649,13 +1649,13 @@
             (dest.isAlphaPremultiplied() != finalDest.isAlphaPremultiplied())){
             // Coerce our source back the way it was...
             System.out.println("Dest: " + dest.isAlphaPremultiplied() +
-                               " finalDest: " + 
+                               " finalDest: " +
                                finalDest.isAlphaPremultiplied());
-            
+
             GraphicsUtil.copyData(dest, finalDest);
         }
         return finalDest;
-    } 
+    }
       */
 }