本文整理汇总了Java中j2dbench.tests.GraphicsTests类的典型用法代码示例。如果您正苦于以下问题:Java GraphicsTests类的具体用法?Java GraphicsTests怎么用?Java GraphicsTests使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GraphicsTests类属于j2dbench.tests包,在下文中一共展示了GraphicsTests类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: flushToScreen
import j2dbench.tests.GraphicsTests; //导入依赖的package包/类
public void flushToScreen() {
if (testImage != null && comp != null) {
Graphics g = comp.getGraphics();
if (GraphicsTests.hasGraphics2D) {
((Graphics2D) g).setComposite(AlphaComposite.Src);
}
g.drawImage(testImage, 0, 0, null);
g.dispose();
}
}
示例2: init
import j2dbench.tests.GraphicsTests; //导入依赖的package包/类
public static void init() {
destroot = new Group.EnableSet(TestEnvironment.globaloptroot,
"dest", "Output Destination Options");
new Screen();
new OffScreen();
if (GraphicsTests.hasGraphics2D) {
if (ImageTests.hasCompatImage) {
compatimgdestroot =
new Group.EnableSet(destroot, "compatimg",
"Compatible Image Destinations");
compatimgdestroot.setHorizontal();
new CompatImg();
new CompatImg(Transparency.OPAQUE);
new CompatImg(Transparency.BITMASK);
new CompatImg(Transparency.TRANSLUCENT);
}
if (ImageTests.hasVolatileImage) {
new VolatileImg();
}
bufimgdestroot = new Group.EnableSet(destroot, "bufimg",
"BufferedImage Destinations");
new BufImg(BufferedImage.TYPE_INT_RGB);
new BufImg(BufferedImage.TYPE_INT_ARGB);
new BufImg(BufferedImage.TYPE_INT_ARGB_PRE);
new BufImg(BufferedImage.TYPE_3BYTE_BGR);
new BufImg(BufferedImage.TYPE_BYTE_INDEXED);
new BufImg(BufferedImage.TYPE_BYTE_GRAY);
new CustomImg();
}
}
示例3: init
import j2dbench.tests.GraphicsTests; //导入依赖的package包/类
public static void init() {
destroot = new Group.EnableSet(TestEnvironment.globaloptroot,
"dest", "Output Destination Options");
new Screen();
new OffScreen();
if (GraphicsTests.hasGraphics2D) {
if (ImageTests.hasCompatImage) {
compatimgdestroot =
new Group.EnableSet(destroot, "compatimg",
"Compatible Image Destinations");
compatimgdestroot.setHorizontal();
new CompatImg();
new CompatImg(Transparency.OPAQUE);
new CompatImg(Transparency.BITMASK);
new CompatImg(Transparency.TRANSLUCENT);
}
if (ImageTests.hasVolatileImage) {
volimgdestroot = new Group.EnableSet(destroot, "volimg",
"Output to Volatile Image");
volimgdestroot.setHorizontal();
new VolatileImg();
if (ImageTests.hasTransparentVolatileImage) {
new VolatileImg(Transparency.OPAQUE);
new VolatileImg(Transparency.BITMASK);
new VolatileImg(Transparency.TRANSLUCENT);
}
}
bufimgdestroot = new Group.EnableSet(destroot, "bufimg",
"BufferedImage Destinations");
new BufImg(BufferedImage.TYPE_INT_RGB);
new BufImg(BufferedImage.TYPE_INT_ARGB);
new BufImg(BufferedImage.TYPE_INT_ARGB_PRE);
new BufImg(BufferedImage.TYPE_3BYTE_BGR);
new BufImg(BufferedImage.TYPE_BYTE_INDEXED);
new BufImg(BufferedImage.TYPE_BYTE_GRAY);
new BufImg(BufferedImage.TYPE_4BYTE_ABGR);
new BufImg(BufferedImage.TYPE_4BYTE_ABGR_PRE);
new CustomImg();
}
}