[Patch] java.awt fixes
Michael Koch
konqueror@gmx.de
Thu Oct 7 07:01:00 GMT 2004
Hi list,
I just merged the attached patch from GNU classpath.
Michael
2004-10-07 Michael Koch <konqueror@gmx.de>
* java/awt/image/AffineTransformOp.java
(TYPE_BILINEAR): Initialize with 2.
* java/awt/print/Printable.java: Jalopied.
(PAGE_EXISTS): Initialize with 0;
(NO_SUCH_PAGE): Initialized with 1.
-------------- next part --------------
Index: java/awt/image/AffineTransformOp.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/image/AffineTransformOp.java,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 AffineTransformOp.java
--- java/awt/image/AffineTransformOp.java 27 Sep 2004 15:14:32 -0000 1.1.2.6
+++ java/awt/image/AffineTransformOp.java 7 Oct 2004 07:00:24 -0000
@@ -54,8 +54,8 @@
public class AffineTransformOp implements BufferedImageOp, RasterOp
{
- public static final int TYPE_BILINEAR = 0;
public static final int TYPE_NEAREST_NEIGHBOR = 1;
+ public static final int TYPE_BILINEAR = 2;
private AffineTransform transform;
private RenderingHints hints;
Index: java/awt/print/Printable.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/print/Printable.java,v
retrieving revision 1.2
diff -u -r1.2 Printable.java
--- java/awt/print/Printable.java 11 Oct 2003 18:16:31 -0000 1.2
+++ java/awt/print/Printable.java 7 Oct 2004 07:00:24 -0000
@@ -1,5 +1,5 @@
/* Printable.java -- Renders a page to the print device
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -35,56 +35,46 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
-
package java.awt.print;
import java.awt.Graphics;
+
/**
- * This interface provides a mechanism for the actual printing of pages to the
- * printer. The object implementing this interface performs the page
- * rendering.
- *
- * @author Aaron M. Renn (arenn@urbanophile.com)
- */
+ * This interface provides a mechanism for the actual printing of pages to the
+ * printer. The object implementing this interface performs the page
+ * rendering.
+ *
+ * @author Aaron M. Renn (arenn@urbanophile.com)
+ */
public interface Printable
{
-
-/*
- * Static Variables
- */
-
-/**
- * This value is returned by the <code>print()</code> method to indicate
- * that the requested page number does not exist.
- */
-int NO_SUCH_PAGE = 0;
-
-/**
- * This value is returned by the <code>print()</code> method to indicate
- * that the requested page exists and has been printed.
- */
-int PAGE_EXISTS = 1;
-
-/*************************************************************************/
-
-/**
- * This method prints the specified page to the specified graphics
- * context in the specified format. The pages are numbered starting
- * from zero.
- *
- * @param graphics The graphics context to render the pages on.
- * @param format The format in which to print the page.
- * @param page_number The page number to print, where numbers start at zero.
- *
- * @return <code>PAGE_EXISTS</code> if the requested page exists and was
- * successfully printed, <code>NO_SUCH_PAGE</code> otherwise.
- *
- * @exception PrinterException If an error occurs during printing.
- */
-int
-print(Graphics graphics, PageFormat format, int page_number)
- throws PrinterException;
-
-} // interface Printable
-
+ /**
+ * This value is returned by the <code>print()</code> method to indicate
+ * that the requested page exists and has been printed.
+ */
+ int PAGE_EXISTS = 0;
+
+ /**
+ * This value is returned by the <code>print()</code> method to indicate
+ * that the requested page number does not exist.
+ */
+ int NO_SUCH_PAGE = 1;
+
+ /**
+ * This method prints the specified page to the specified graphics
+ * context in the specified format. The pages are numbered starting
+ * from zero.
+ *
+ * @param graphics The graphics context to render the pages on.
+ * @param format The format in which to print the page.
+ * @param page_number The page number to print, where numbers start at zero.
+ *
+ * @return <code>PAGE_EXISTS</code> if the requested page exists and was
+ * successfully printed, <code>NO_SUCH_PAGE</code> otherwise.
+ *
+ * @exception PrinterException If an error occurs during printing.
+ */
+ int print(Graphics graphics, PageFormat format, int page_number)
+ throws PrinterException;
+}
More information about the Java-patches
mailing list