/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6728834 6749060
* @summary Tests that LCD AA text rendering works properly with destinations
* being VolatileImage of all transparency types
* @author Dmitri.Trembovetski: area=Graphics
*/
private static volatile boolean passed = true;
public NonOpaqueDestLCDAATest() {
"\n Instructions: the three text strings below should appear" +
" readable, without smudges or misshapen bold glyphs.\n" +
" You may need a magnifier to notice some bad colorfringing in "+
" in SW Translucent case, especially in vertical stems.\n\n"+
" Basically text rendered to TRANSLUCENT destination should look"+
" similar to one rendered to OPAQUE - it may differ in whether or" +
" not it's LCD, but it should look 'correct'\n\n"+
"If the text looks fine the test PASSED otherwise it FAILED.\n");
desc.setEditable(false);
public void paintComponent(Graphics g) {
}
};
public void componentResized(ComponentEvent e) {
}
});
passedBtn.addActionListener(this);
failedBtn.addActionListener(this);
add("South", p);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
}
});
}
initImages(w, h);
}
}
passed = true;
try {
if (images[i] instanceof VolatileImage) {
f += "_vi.png";
} else {
f += "_bi.png";
"png", new File(f));
}
} catch (Throwable t) {}
}
passed = false;
}
dispose();
}
} else {
}
}
}
private void initImages(int w, int h) {
for (int i = OPAQUE; i <= TRANSLUCENT; i++) {
}
}
}
public void run() {
NonOpaqueDestLCDAATest t = new NonOpaqueDestLCDAATest();
t.pack();
t.setVisible(true);
}
});
if (!passed) {
throw new RuntimeException("Test Failed!");
}
}
}