< prev index next >
test/java/awt/SplashScreen/MultiResolutionSplash/unix/UnixMultiResolutionSplashTest.java
Print this page
*** 42,65 ****
import java.util.List;
import java.util.Map;
import javax.imageio.ImageIO;
/**
! * @test @bug 8145174
* @summary HiDPI splash screen support on Linux
* @modules java.desktop/sun.java2d
* @run main UnixMultiResolutionSplashTest
*/
public class UnixMultiResolutionSplashTest {
private static final int IMAGE_WIDTH = 300;
private static final int IMAGE_HEIGHT = 200;
private static int inx = 0;
private static final ImageInfo[] tests = {
! new ImageInfo("splash1.png", "splash1.java-scale2x.png", Color.BLUE, Color.GREEN),
! new ImageInfo("splash2", "splash2.java-scale2x", Color.WHITE, Color.BLACK),
! new ImageInfo("splash3.", "splash3.java-scale2x.", Color.YELLOW, Color.RED)
};
public static void main(String[] args) throws Exception {
if (args.length == 0) {
--- 42,65 ----
import java.util.List;
import java.util.Map;
import javax.imageio.ImageIO;
/**
! * @test @bug 8145174 8151787
* @summary HiDPI splash screen support on Linux
* @modules java.desktop/sun.java2d
* @run main UnixMultiResolutionSplashTest
*/
public class UnixMultiResolutionSplashTest {
private static final int IMAGE_WIDTH = 300;
private static final int IMAGE_HEIGHT = 200;
private static int inx = 0;
private static final ImageInfo[] tests = {
! new ImageInfo("splash1.png", "splash1@200pct.png", Color.BLUE, Color.GREEN),
! new ImageInfo("splash2", "splash2@2x", Color.WHITE, Color.BLACK),
! new ImageInfo("splash3.", "splash3@200pct.", Color.YELLOW, Color.RED)
};
public static void main(String[] args) throws Exception {
if (args.length == 0) {
*** 94,105 ****
}
Graphics2D g = splashScreen.createGraphics();
Rectangle splashBounds = splashScreen.getBounds();
int screenX = (int) splashBounds.getCenterX();
int screenY = (int) splashBounds.getCenterY();
- System.out.println(screenX);
- System.out.println(screenY);
Robot robot = new Robot();
Color splashScreenColor = robot.getPixelColor(screenX, screenY);
float scaleFactor = getScaleFactor();
Color testColor = (1 < scaleFactor) ? test.color2x : test.color1x;
--- 94,103 ----
< prev index next >