-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
beta
-
x86
-
solaris_7
###@###.###
The image from the test is displayed with incorrect colors. Colors
seems to be mixed up, for example instead of red - light-blue, instead
of yellow - white and etc. It seems depend on the client configuration
- it should be Solaris 5.7 on x86 and some X-server
configurations. Below is the list of configurations had been tested.
Client: Solaris 5.7 x86
X-Server:
Wrong: AstecX(WinNT 32bit color mode, autoselect visual)
Exceed(WinNT 32bit color mode, autoselect visual)
Sol5.8(Sparc 256 colors)
Correct: X11R6(Linux on i386, 32bit color mode)
The bug is not reproducible on Kestrel. It came into existence in
Merlin. After the last Merlin 2D integration (build b34) the behavior
was somewhat changed. Some colors displayed in a right way now, but
other still wrong (this could be better observed with SwingSet2)
Below is the test to reproduce the bug. Steps to reproduce:
1. Run ColorTest
2. Frame will appear. Correct frame should consist of red label
"Capture This" on yellow background.
----------------- ColorTest.java -------------------------
import java.awt.*;
import java.util.*;
import java.awt.image.*;
public class ColorTest extends Frame {
//Declare things used in the test, like buttons and labels here
ImageCanvas canvas;
Image displayImage;
BufferedImage realImage;
public ColorTest() {
super("Color Test Frame");
//Creating Image
realImage = new BufferedImage(200, 100, BufferedImage.TYPE_BYTE_INDEXED);
Graphics g = realImage.createGraphics();
g.setColor(Color.yellow);
g.fillRect(0,0,200,100);
g.setColor(Color.red);
g.setFont(new Font("SansSerif",Font.BOLD, 30));
g.drawString("Capture This",10,40);
g.dispose();
displayImage = realImage;
canvas = new ImageCanvas();
canvas.setBackground(Color.yellow);
add(canvas);
setSize(300,150);
setLocation(new Point(10,400));
setVisible(true);
toFront();
canvas.requestFocus();
}//End init()
// Inner class , To display the image
public class ImageCanvas extends Canvas {
public void paint(Graphics g) {
// Paints the Canvas
g.drawImage(displayImage, 0, 0, this);
}
} //End Inner class ImageCanvas
public static void main(String args[]) {
new ColorTest();
}
}// class ColorTest
----------------- end of ColorTest.java --------------------
The image from the test is displayed with incorrect colors. Colors
seems to be mixed up, for example instead of red - light-blue, instead
of yellow - white and etc. It seems depend on the client configuration
- it should be Solaris 5.7 on x86 and some X-server
configurations. Below is the list of configurations had been tested.
Client: Solaris 5.7 x86
X-Server:
Wrong: AstecX(WinNT 32bit color mode, autoselect visual)
Exceed(WinNT 32bit color mode, autoselect visual)
Sol5.8(Sparc 256 colors)
Correct: X11R6(Linux on i386, 32bit color mode)
The bug is not reproducible on Kestrel. It came into existence in
Merlin. After the last Merlin 2D integration (build b34) the behavior
was somewhat changed. Some colors displayed in a right way now, but
other still wrong (this could be better observed with SwingSet2)
Below is the test to reproduce the bug. Steps to reproduce:
1. Run ColorTest
2. Frame will appear. Correct frame should consist of red label
"Capture This" on yellow background.
----------------- ColorTest.java -------------------------
import java.awt.*;
import java.util.*;
import java.awt.image.*;
public class ColorTest extends Frame {
//Declare things used in the test, like buttons and labels here
ImageCanvas canvas;
Image displayImage;
BufferedImage realImage;
public ColorTest() {
super("Color Test Frame");
//Creating Image
realImage = new BufferedImage(200, 100, BufferedImage.TYPE_BYTE_INDEXED);
Graphics g = realImage.createGraphics();
g.setColor(Color.yellow);
g.fillRect(0,0,200,100);
g.setColor(Color.red);
g.setFont(new Font("SansSerif",Font.BOLD, 30));
g.drawString("Capture This",10,40);
g.dispose();
displayImage = realImage;
canvas = new ImageCanvas();
canvas.setBackground(Color.yellow);
add(canvas);
setSize(300,150);
setLocation(new Point(10,400));
setVisible(true);
toFront();
canvas.requestFocus();
}//End init()
// Inner class , To display the image
public class ImageCanvas extends Canvas {
public void paint(Graphics g) {
// Paints the Canvas
g.drawImage(displayImage, 0, 0, this);
}
} //End Inner class ImageCanvas
public static void main(String args[]) {
new ColorTest();
}
}// class ColorTest
----------------- end of ColorTest.java --------------------