[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: comments and identation fixes for LookupOp
Kaffe CVS
cvs-commits at kaffe.org
Wed Nov 10 17:38:10 PST 2004
PatchSet 5439
Date: 2004/11/11 01:33:49
Author: robilad
Branch: HEAD
Tag: (none)
Log:
Resynced with GNU Classpath: comments and identation fixes for LookupOp
2004-11-11 Dalibor Topic <robilad at kaffe.org>
* libraries/javalib/java/awt/image/LookupOp.java:
Resynced with GNU Classpath.
2004-11-07 Mark Wielaard <mark at klomp.org>
* java/awt/image/LookupOp.java: Comments and indentation fixes.
Members:
ChangeLog:1.2986->1.2987
libraries/javalib/java/awt/image/LookupOp.java:1.1->1.2
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2986 kaffe/ChangeLog:1.2987
--- kaffe/ChangeLog:1.2986 Thu Nov 11 01:19:17 2004
+++ kaffe/ChangeLog Thu Nov 11 01:33:49 2004
@@ -1,5 +1,14 @@
2004-11-11 Dalibor Topic <robilad at kaffe.org>
+ * libraries/javalib/java/awt/image/LookupOp.java:
+ Resynced with GNU Classpath.
+
+ 2004-11-07 Mark Wielaard <mark at klomp.org>
+
+ * java/awt/image/LookupOp.java: Comments and indentation fixes.
+
+2004-11-11 Dalibor Topic <robilad at kaffe.org>
+
* libraries/javalib/gnu/java/security/provider/GnuDSAPrivateKey.java,
libraries/javalib/gnu/java/security/provider/GnuDSAPublicKey.java:
Resynced with GNU Classpath.
Index: kaffe/libraries/javalib/java/awt/image/LookupOp.java
diff -u kaffe/libraries/javalib/java/awt/image/LookupOp.java:1.1 kaffe/libraries/javalib/java/awt/image/LookupOp.java:1.2
--- kaffe/libraries/javalib/java/awt/image/LookupOp.java:1.1 Sun Nov 7 21:10:18 2004
+++ kaffe/libraries/javalib/java/awt/image/LookupOp.java Thu Nov 11 01:33:51 2004
@@ -1,4 +1,4 @@
-/* ColorModel.java --
+/* LookupOp.java -- Filter that converts each pixel using a lookup table.
Copyright (C) 2004 Free Software Foundation
This file is part of GNU Classpath.
@@ -35,12 +35,6 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-/*
- * Created on Oct 6, 2004
- *
- * TODO To change the template for this generated file go to
- * Window - Preferences - Java - Code Style - Code Templates
- */
package java.awt.image;
import java.awt.Graphics2D;
@@ -67,7 +61,8 @@
*
* @author jlquinn
*/
-public class LookupOp implements BufferedImageOp, RasterOp {
+public class LookupOp implements BufferedImageOp, RasterOp
+{
private LookupTable lut;
private RenderingHints hints;
@@ -89,7 +84,7 @@
{
if (src.getColorModel() instanceof IndexColorModel)
throw new IllegalArgumentException("LookupOp.filter: IndexColorModel "
- + "not allowed");
+ + "not allowed");
if (dst == null)
dst = createCompatibleDestImage(src, src.getColorModel());
@@ -122,10 +117,12 @@
dr.setPixel(x, y, lut.lookupPixel(tmp, dbuf));
}
}
- else if (lut.getNumComponents() != 1 &&
- lut.getNumComponents() != src.getColorModel().getNumComponents())
- throw new IllegalArgumentException("LookupOp.filter: Incompatible lookup "
- + "table and source image");
+ else if (lut.getNumComponents() != 1
+ &&
+ lut.getNumComponents() != src.getColorModel().getNumComponents())
+ throw new IllegalArgumentException("LookupOp.filter: "
+ + "Incompatible lookup "
+ + "table and source image");
// No alpha to ignore
int[] dbuf = new int[src.getColorModel().getNumComponents()];
@@ -160,12 +157,12 @@
* @see java.awt.image.BufferedImageOp#createCompatibleDestImage(java.awt.image.BufferedImage, java.awt.image.ColorModel)
*/
public BufferedImage createCompatibleDestImage(BufferedImage src,
- ColorModel dstCM)
+ ColorModel dstCM)
{
// FIXME: set properties to those in src
return new BufferedImage(dstCM,
- src.getRaster().createCompatibleWritableRaster(),
- src.isPremultiplied, null);
+ src.getRaster().createCompatibleWritableRaster(),
+ src.isPremultiplied, null);
}
/** Return corresponding destination point for source point.
@@ -177,7 +174,9 @@
*/
public Point2D getPoint2D(Point2D src, Point2D dst)
{
- if (dst == null) return (Point2D)src.clone();
+ if (dst == null)
+ return (Point2D) src.clone();
+
dst.setLocation(src);
return dst;
}
@@ -218,7 +217,8 @@
if (src.getNumBands() != dest.getNumBands())
throw new IllegalArgumentException();
- if (lut.getNumComponents() != 1 && lut.getNumComponents() != src.getNumBands())
+ if (lut.getNumComponents() != 1
+ && lut.getNumComponents() != src.getNumBands())
throw new IllegalArgumentException();
More information about the kaffe
mailing list