--- /dev/null 2010-06-29 10:52:54.337250608 +0200 +++ new/./test/java/awt/Graphics2D/RenderingEngineTests/RenderingEngineTest.java 2010-12-14 14:55:42.000000000 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright 2010 Red Hat, Inc. All Rights Reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + +/* + * Helper class for rendering engine tests. + */ +public class RenderingEngineTest { + + protected static Object[] getGraphics(int w, int h) { + BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); + Graphics2D g2 = (Graphics2D) bi.getGraphics(); + g2.setColor(Color.white); + g2.fillRect(0, 0, w, h); + g2.setColor(Color.black); + return new Object[] {bi, g2}; + } +} +