[JAVA2D] setting color with Graphics2D on a BufferedImage with IndexColorModel

2004-10-20 Thread Bodo T
I hava a BufferedImage from a GIF, the ColorModel is a IndexColorModel . Since i finally want to write back the modified image to a GIF , i don't want to change the color model, especially my application need to absolutely keep the palette as it is used in the original GIF. Then i did create a

Re: [JAVA2D] Help with image!

2004-10-20 Thread Chet Haase
Seems like the most straightforward way to do this would be to use the drawImage() variant that takes source and dest rectangles, that is: public boolean drawImage(Image, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, ImageObserver) Using this method, you can specify the source rect as the

[JAVA2D] Resizing a JFrame with OpenGL pipeline

2004-10-20 Thread Emmanuel Pietriga
Hello, While testing the new OpenGL rendering pipeline of J2SE 5.0, I noticed what seems to be a bug, but I'd like to check with people here before filing a report in the database. I have a simple JFrame with a JPanel inside (see code below). I've defined a simple paint(Graphics g) method for this

Re: [JAVA2D] setting color with Graphics2D on a BufferedImage with IndexColorModel

2004-10-20 Thread Jim Graham
My problem: if I use a color that is not contained in the palette, or if I call drawString() with font antialiasing , which will produce pixels with a color not contained in the palette. How is are these new colors mapped to the palette color? There is no specification to define how this mapping

[JAVA2D] Displaying AutoCAD SHX fonts in Java2D

2004-10-20 Thread Augusto Sellhorn
Anybody know of a library that enables you to read AutoCAD SHX fonts in Java2D? I'm guessing that my only solution is to have somebody convert the SHX fonts to True Type and then use the TTF in Java, but I was wondering if anybody's heard of some type of reader in Java2D. Thanks Augusto