Re: [cp-patches] FYI: scanline fix and image scaling for escher.
On 15/06/2008, Mario Torre [EMAIL PROTECTED] wrote: One of 3 patches, i wish we could already use hg with the record extension... This patch fixes a few problems in AbstractGraphics2D and RasterGraphics (which is not fully working yet anyway, but at least we avoid some nasty exceptions). Also, I'm syncing the image scaler code for escher that Roman wrote in Jamaica. The full changelog for all the patchset follows. Thanks, Mario 2008-06-15 Mario Torre [EMAIL PROTECTED] * gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): delegate to setPaint. (setPaint): fix to set paint context and foreground color. (imageCache): new field. (drawImage): new codepath for scaling images. (prepareImage): new method. (getPaintContext): set paintContext appropriately. * gnu/java/awt/java2d/RasterGraphics.java (renderScanline): new method, override from superclass to detect correct value of y while rendering the scanline. * gnu/java/awt/java2d/ScanlineConverter.java (renderShape): revert previous patch. * gnu/java/awt/peer/x/XEventPump.java (findMouseEventTarget): new method. (handleButtonPress): use of findMouseEventTarget to detect the correct target. (handleButtonRelease): likewise. * gnu/java/awt/peer/x/XGraphics2D.java (rawDrawImage): clip the target image so that it is completely contained in the destination pixmaps, as per X11 specification. * gnu/java/awt/peer/x/XToolkit.java (createTextField): method implemented. (createButton): likewise. (prepareImage): likewise. (createLabel): likewise. (checkImage): likewise. (createTextArea): likewise. (createCheckbox): likewise. (checkHeadLess): new method. * gnu/javax/imageio/bmp/BMPImageWriter.java (write): don't close the stream. * gnu/javax/imageio/bmp/BMPImageWriterSpi.java (names): added new names to the list of known names for BMP. * java/awt/image/WritableRaster.java (createWritableTranslatedChild): * javax/imageio/ImageIO.java (write): call dispose on ImageWriter after writing of the image. -- Mario Torre, Software Developer, http://www.jroller.com/neugens/ aicas Allerton Interworks Computer Automated Systems GmbH Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany http://www.aicas.com * Tel: +49-721-663 968-53 pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim Geschäftsführer: Dr. James J. Hunt Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ This change breaks the build: Index: gnu/java/awt/java2d/RasterGraphics.java === RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/RasterGraphics.java,v retrieving revision 1.4 diff -u -r1.4 RasterGraphics.java --- gnu/java/awt/java2d/RasterGraphics.java 29 May 2008 16:41:39 - 1.4 +++ gnu/java/awt/java2d/RasterGraphics.java 15 Jun 2008 17:54:00 - @@ -38,6 +38,9 @@ package gnu.java.awt.java2d; +import gnu.x11.image.ZPixmap; + +import java.awt.Color; -- Andrew :-) Support Free Java! Contribute to GNU Classpath and the OpenJDK http://www.gnu.org/software/classpath http://openjdk.java.net PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
Re: [cp-patches] FYI: scanline fix and image scaling for escher.
Il giorno dom, 15/06/2008 alle 20.56 +0100, Andrew John Hughes ha scritto: This change breaks the build: Index: gnu/java/awt/java2d/RasterGraphics.java === RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/RasterGraphics.java,v retrieving revision 1.4 diff -u -r1.4 RasterGraphics.java --- gnu/java/awt/java2d/RasterGraphics.java 29 May 2008 16:41:39 - 1.4 +++ gnu/java/awt/java2d/RasterGraphics.java 15 Jun 2008 17:54:00 - @@ -38,6 +38,9 @@ package gnu.java.awt.java2d; +import gnu.x11.image.ZPixmap; + +import java.awt.Color; Ops, sorry, patch already committed :) Mario -- Mario Torre, Software Developer, http://www.jroller.com/neugens/ aicas Allerton Interworks Computer Automated Systems GmbH Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany http://www.aicas.com * Tel: +49-721-663 968-53 pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF Fingerprint: BA39 9666 94EC 8B73 27FA FC7C 4086 63E3 80F2 40CF USt-Id: DE216375633, Handelsregister HRB 109481, AG Mannheim Geschäftsführer: Dr. James J. Hunt Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ ### Eclipse Workspace Patch 1.0 #P classpath Index: gnu/java/awt/java2d/RasterGraphics.java === RCS file: /sources/classpath/classpath/gnu/java/awt/java2d/RasterGraphics.java,v retrieving revision 1.5 diff -u -r1.5 RasterGraphics.java --- gnu/java/awt/java2d/RasterGraphics.java 15 Jun 2008 18:14:55 - 1.5 +++ gnu/java/awt/java2d/RasterGraphics.java 15 Jun 2008 20:57:12 - @@ -38,9 +38,6 @@ package gnu.java.awt.java2d; -import gnu.x11.image.ZPixmap; - -import java.awt.Color; import java.awt.GraphicsConfiguration; import java.awt.Rectangle; import java.awt.image.ColorModel; Index: ChangeLog === RCS file: /sources/classpath/classpath/ChangeLog,v retrieving revision 1.9642 diff -u -r1.9642 ChangeLog --- ChangeLog 15 Jun 2008 18:14:56 - 1.9642 +++ ChangeLog 15 Jun 2008 20:57:12 - @@ -1,4 +1,9 @@ 2008-06-15 Mario Torre [EMAIL PROTECTED] + + * gnu/java/awt/java2d/RasterGraphics.java: remove unused import that cause + compilation to fail when xpeers are not enabled. + +2008-06-15 Mario Torre [EMAIL PROTECTED] * gnu/java/awt/java2d/AbstractGraphics2D.java (setColor): delegate to setPaint.